NextJSON Blog
Guides to the problems these tools solve: how the formats work, what goes wrong, and how to do the same thing in code.
List to Array: Quoting, Escaping and the Syntax Each Language Expects
How to turn a pasted column into an array literal for JSON, JavaScript, Python, SQL and Bash, when to quote numbers, and how to escape values that contain quotes.
Decoding TOON Back to JSON: Type Rules, Strict Mode and Validating LLM Output
How a TOON decoder decides between strings, numbers and booleans, what strict mode rejects, and how declared array lengths catch truncated LLM output.
TOON Format Explained: Where It Saves Tokens and Where It Does Not
A tour of TOON syntax, measured sizes against pretty and minified JSON for flat and nested data, and a rule of thumb for when to send TOON to an LLM.
Comparing Two Lists: Set Difference, Intersection and the Gotchas
The three questions behind every list comparison, the normalization mistakes that produce false differences, and how to do it in Excel, the shell, Python and SQL.
How JSON Diff Works: Structural Comparison vs. Text Diff
Why line-based diff tools report false changes on JSON, how a structural diff walks two documents, the three ways to compare arrays, and where JSON Patch fits in.
From JSON Schema to Sample JSON: Mock Data, Examples and Edge Cases
How sample generators turn schema keywords into values, which keywords simple generators skip, and how to make sure a generated example really validates.
Inferring a JSON Schema from Sample JSON: What a Generator Can and Cannot Know
How schema inference works, the seven things a single sample cannot tell a generator, a checklist for tightening the result, and how to validate against draft 2020-12.
JSON Minification: What It Saves and What It Does Not
Measured sizes for pretty, minified and gzipped JSON, the cases where one-line JSON is required, and the values a parse-and-reprint minifier can silently change.
Double-Encoded JSON: Why It Happens and How to Decode It
Why JSON ends up as an escaped string inside other JSON, how the backslashes multiply with each layer, and how to decode it safely in JavaScript, Python and jq.