Results for “Encoding & structured values”
Small, practical examples. Search by task or narrow things down below.
Propagate a parsing error with question mark
Propagate a parsing error with question mark in a complete Rust program using the standard library.
Rust✓ Tested
Provide a default for a missing value
Provide a default for a missing value in a complete Rust program using the standard library.
Rust✓ Tested
Quote a CSV field and double embedded quotes
C: A quoted CSV field represents a quote character by repeating it.
C✓ Tested
Quote a literal search term for a regex
C#: Regex.Escape prevents metacharacters in a literal term from changing the pattern.
C#✓ Tested
Read a big-endian integer from bytes
Read a big-endian integer from bytes using a complete Go program with explicit sample inputs.
Go✓ Tested
Read a tab-separated table
Python: Select a delimiter explicitly rather than splitting lines manually.
Python✓ Tested
Read a variant only when it holds the expected type
C++: get_if returns a null pointer rather than throwing for another active alternative.
C++✓ Tested
Read elements from trusted XML
Python: Use ElementTree to inspect a small trusted XML document.
Python✓ Tested
Read named regex capture groups
JavaScript: Named groups make a fixed input format easier to inspect than numeric group positions.
JavaScript✓ Tested
Read named regex capture groups
TypeScript: Named groups make a fixed input format easier to inspect than numeric group positions.
TypeScript✓ Tested
Read one JSON document per line
Python: Parse nonempty JSON Lines records independently instead of loading a JSON array.
Python✓ Tested
Read quoted CSV fields
Read quoted CSV fields using a complete Go program with explicit sample inputs.
Go✓ Tested