FIND YOUR NEXT FEW LINES
Results for “JSON & encoding”
Small, practical examples. Search by task or narrow things down below.
128 snippets foundClear filters
Select object properties
Create a smaller object with only the fields you need.
Select-Object✓ Tested
Serialize an object
Turn a JavaScript object into JSON text.
JavaScript✓ Tested
Set an image’s default command
Use JSON array syntax for a predictable command.
Dockerfile✓ Tested
Validate an unknown value with a type guard
Check a field before treating unknown data as a typed object.
unknown✓ Tested
Write a UTF-8 file
Write a Java string to a file using an explicit text encoding.
Java✓ Tested
Write and read binary bytes
Java: Use the byte-oriented Files methods when text encoding should not be involved.
Java✓ Tested
Write and read raw bytes
C#: Use the byte-oriented file APIs when no text encoding should be applied.
C#✓ Tested
Write dictionaries to CSV
Write a list of dictionaries to a CSV file with a header row and a predictable column order.
csv✓ Tested