FIND YOUR NEXT FEW LINES

Results for “JSON & encoding”

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

128 snippets foundClear filters
PowerShellStructured formats & encodings

Write object records to a CSV file

PowerShell: Export-Csv uses property names as headers and quotes values when needed.

PowerShell✓ Tested
PowerShellFile operations & integrity

Append a line while keeping earlier content

PowerShell: Add-Content appends using an explicitly selected encoding.

PowerShell✓ Tested
PostgresJSON & arrays

Collect ordered values into an array

Build a sorted array from query rows.

array_agg✓ Tested
PostgresJSON & arrays

Expand an array into rows

Use WITH ORDINALITY to retain original element order.

unnest✓ Tested
JavaScriptObjects & JSON

Iterate over object entries

Read JavaScript property names and values using Object.entries.

JavaScript✓ Tested
Docker / ComposeDockerfile patterns

Keep exec-form arguments literal

Docker / Compose: JSON exec form does not expand shell environment variables.

Docker / Compose✓ Tested
JavaFile operations & binary data

Load a small properties configuration

Java: Use a Reader to make the configuration character encoding explicit.

Java✓ Tested
JavaScriptObjects & JSON

Merge object settings

Use object spread to apply JavaScript overrides to defaults.

JavaScript✓ Tested
JavaScriptObjects & JSON

Read a nested value safely

Combine optional chaining with nullish coalescing in JavaScript.

JavaScript✓ Tested
PythonFile operations & archives

Read compressed text directly

Python: Open gzip data in text mode with an explicit encoding.

Python✓ Tested
PythonJSON & CSV

Read CSV rows as dictionaries

Read a CSV file using its header row as dictionary keys, so each column can be accessed by name.

csv✓ Tested
SQL ServerJSON & results

Read values generated by INSERT

Capture an IDENTITY value with OUTPUT.

OUTPUT✓ Tested