Skip to main content

JSON guides and references

Working notes on the parts of JSON that actually cause problems — parse errors, schema evolution, array diffing, type inference and the Excel behaviours that quietly corrupt a CSV export. Each article links to the tool that does the job.

  • Reference · 7 min read

    Does Minifying JSON Matter If You Use Gzip?

    Almost every guide tells you to minify JSON to save bandwidth. Almost none of them measure what happens after the compressor has had its turn.

  • Reference · 8 min read

    The YAML Norway Problem, and When It Applies

    A list of country codes, a YAML parser, and Norway quietly turns into false. The famous version of this story is true — but whether it happens to you depends entirely on which parser you are holding.

  • Workflow · 8 min read

    Unexpected Token < in JSON: What It Means

    If the unexpected token is `<`, you are not looking at a JSON problem. You are looking at an HTML page where JSON should have been.

  • Reference · 7 min read

    NDJSON: One JSON Document Per Line

    One big array has to be complete to be worth anything. Lose the last byte and you lose every record. NDJSON costs nothing to adopt and does not have that property.

  • Workflow · 8 min read

    How to Open a Large JSON File

    Your editor is not slow at parsing JSON. It is slow at drawing it. Those are different problems with different solutions.

  • Comparison · 6 min read

    JSON Pointer vs JSONPath: Which One to Use

    They look like they do the same job. One is a precise address for a single value; the other is a query that may match hundreds. Picking wrong makes everything downstream awkward.

  • Workflow · 8 min read

    How to Debug an API JSON Response

    Most “the API is broken” incidents are a field that changed type, a field that went missing, or a null nobody expected.

  • Workflow · 7 min read

    How to Generate TypeScript from JSON

    Generated types are inference from evidence. The quality of the output is entirely determined by the quality of the sample.

  • Workflow · 7 min read

    How to Compare Two JSON Files Properly

    Reorder a few keys and `git diff` says every line changed. A structural diff says nothing changed — because nothing did.

  • Comparison · 7 min read

    JSON vs YAML: Which to Use and When

    JSON for machines, YAML for humans — with a short list of YAML behaviours that have caused real outages.

  • Fundamentals · 7 min read

    How to Validate JSON: Syntax and Schema

    “Unexpected token } in JSON at position 582” is a true statement and a useless one. Here is how to get from it to the actual problem.

  • Workflow · 6 min read

    How to Format JSON (and When Not To)

    Formatting changes nothing but whitespace — which is exactly why choosing the right moment to do it matters.