FIND YOUR NEXT FEW LINES

Results for “json_valid”

Small, practical examples. Search by task or narrow things down below.

247 snippets foundClear filters
PostgresJSON & arrays

Collect ordered values into an array

Build a sorted array from query rows.

array_agg✓ Tested
PythonGetting Started

Convert known numeric text to an integer

Python: Convert a trusted literal to an integer before adding. Validate external input before converting it.

Python✓ Tested
C#Getting Started

Convert known numeric text to an integer

C#: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C#✓ Tested
JavaGetting Started

Convert known numeric text to an integer

Java: Convert a trusted literal to an integer before adding. Validate external input before converting it.

Java✓ Tested
JavaScriptGetting Started

Convert known numeric text to an integer

JavaScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.

JavaScript✓ Tested
TypeScriptGetting Started

Convert known numeric text to an integer

TypeScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.

TypeScript✓ Tested
C++Getting Started

Convert known numeric text to an integer

C++: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C++✓ Tested
CGetting Started

Convert known numeric text to an integer

C: Convert a trusted literal to an integer before adding. Validate external input before converting it.

C✓ Tested
Arduino / CArrays & embedded state

Dispatch a command through function pointers

Arduino / C: A small function table can map validated command indices to actions.

Arduino / C✓ Tested
SQLiteTables & writes

Enable and use foreign keys

Turn on relationship enforcement for the connection.

foreign keys✓ Tested
PostgresJSON & arrays

Expand an array into rows

Use WITH ORDINALITY to retain original element order.

unnest✓ Tested
C++Numeric parsing & calculations

Handle a failed string-to-integer conversion

C++: stoi throws invalid_argument when no conversion can be performed.

C++✓ Tested