FIND YOUR NEXT FEW LINES

Results for “json_set”

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

599 snippets foundClear filters
SQLiteJSON data

Check whether text is valid JSON

Reject malformed input before processing it.

json_valid✓ Tested
Bash ScriptsText parsing & arithmetic

Clamp a numeric setting to a valid range

Bash Scripts: Use arithmetic comparisons before applying a user-supplied bounded setting.

Bash Scripts✓ Tested
C#Collections & data structures

Combine collections as a distinct set

C#: Union retains each value once across both inputs.

C#✓ Tested
C#Dates & precise numbers

Convert a timestamp to a different fixed offset

C#: ToOffset changes the displayed local time while retaining the same instant.

C#✓ Tested
PythonDates & time zones

Convert an aware datetime to another offset

Python: Use astimezone for conversion; replacing tzinfo alone does not convert an instant.

Python✓ Tested
C#Dates & precise numbers

Convert Unix seconds to an offset-aware timestamp

C#: DateTimeOffset preserves the UTC offset explicitly.

C#✓ Tested
CSmall algorithms & bit operations

Count set bits in an unsigned integer

C: Clearing the lowest set bit on each iteration counts only one iteration per set bit.

C✓ Tested
GoJSON & encoding

Decode JSON into a typed struct

Decode JSON into a typed struct using a complete Go program with explicit sample inputs.

Go✓ Tested
C#JSON & binary formats

Deserialize a JSON object into a dictionary

C#: Specify the value type expected from a known JSON shape.

C#✓ Tested
PowerShellCommands & execution context

Discard incidental output from a setup command

PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.

PowerShell✓ Tested
GoDates & times

Display an instant at a fixed offset

Display an instant at a fixed offset using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsParameter expansion

Distinguish unset variables from empty strings

Bash Scripts: Omitting the colon tests only whether a variable is unset; including it also treats an empty value as missing.

Bash Scripts✓ Tested