The JSONTools Blog
In-depth guides on JSON, JSON Schema, JWT, JSONPath, REST APIs, and everything in between. Written for developers who want more than the official docs.
Measured, not summarised
Each of these is built from data produced by running code — 1,050 error strings captured from 21 JSON parsers, 165 round-trip results, and an audit of all 646 schemas in the SchemaStore catalogue. None of it can be written from memory.
Which languages silently corrupt large JSON numbers
Measured across 11 JSON parsers: which ones round a 64-bit integer, which preserve it, and what happens to 1e400. No errors are raised — the values just change.
What every JSON parser does with duplicate keys
Measured: no parser rejects a duplicated JSON key, most keep the last value, and System.Text.Json keeps both. Why this reaches production and how to detect it.
The same JSON error, worded three different ways
Chrome, Firefox and Safari word identical JSON syntax errors completely differently. Measured side by side, with the full cross-engine table.
133 of 646 real JSON Schemas have keywords that do nothing
An audit of every schema in the SchemaStore catalogue: keywords beside $ref are silently ignored, and one in five schemas does it. Full findings and draft adoption data.
Newtonsoft accepts what System.Text.Json rejects
Measured side by side on malformed JSON: which inputs Newtonsoft tolerates silently, which System.Text.Json rejects, and what that means for a .NET migration.
Streaming a 101 MB JSON file uses 1 MB of memory
Benchmarked: JSON.parse costs 2.9 s and 299 MB on a 101 MB file. A streaming byte scanner does the same validation in 620 ms and 1 MB. Full numbers and why the gap is so large.
When JSON Merge Patch cannot do the job
Measured over 39,230 changes: Merge Patch is smaller 96.2% of the time but cannot express 9.6% of changes at all. Why, and how to choose.
Every JSON serializer escapes differently
Measured across twelve serializers: Go escapes HTML characters, Python escapes all non-ASCII, Gson escapes the apostrophe. The full cross-language escaping table.
Tutorial
Parsing JSON in Go, Rust, and Python: Idiomatic Approaches Compared
Compare JSON parsing idioms across three popular languages. Struct tags, serde, dataclasses, error handling, performance trade-offs, and which approach fits your style.
How to Compare Two JSON Files: 5 Methods With Examples
Compare two JSON files line-by-line, semantically, or structurally. Compare nested objects, ignore key order, find differences in arrays. With browser, CLI, and Python examples.
Common JSON Parsing Errors and How to Fix Them
The eight most common JSON parsing errors with examples, exact error messages, and fixes. Covers trailing commas, unescaped characters, BOM, encoding, and more.
JSON for Complete Beginners: A 10-Minute Tutorial
Learn JSON from scratch in 10 minutes. Syntax, data types, nesting, and your first practical examples. No prior programming experience required.
Comparisons
JSON vs XML: When to Use Each Format
XML once ruled data interchange — now JSON dominates. We compare both formats on syntax, performance, tooling, and use cases, with practical guidance on when XML still wins.
JSON vs YAML: Which Format Should You Use in 2026?
Detailed comparison of JSON and YAML — syntax, readability, performance, tooling, and when to choose each. With examples from Kubernetes, GitHub Actions, and API design.
Reference
JSONC and JSON5: When to Use JSON With Comments
JSONC and JSON5 add comments and trailing commas to JSON. Compare their syntax, where each is used (VS Code, npm), and how to convert them to strict JSON.
JSON Data Types: The Complete Reference
A complete guide to the six JSON data types — string, number, boolean, null, object, array — with edge cases around numbers, Unicode, and how each language maps them.
JSON Schema Draft 7 vs 2020-12: What Changed and What to Use
A practical comparison of JSON Schema Draft 7 and Draft 2020-12. New keywords, breaking changes, $ref behavior, and how to choose between them for your project.
Api Design
Performance
How to Handle Large JSON Files Without Running Out of Memory
Strategies for parsing, querying, and transforming gigabyte-scale JSON files — streaming parsers in Python, Node.js, jq, and when to convert to JSONL.
The Performance Cost of Deeply Nested JSON
Why deeply nested JSON hurts parser performance, memory use, and API consumer code. Benchmarks, when nesting is worth it, and how to flatten responsibly.
Minify JSON for API Performance: Does It Actually Help?
When and how much JSON minification matters for API performance. Measured impact, comparison with gzip/brotli, and when minifying is a waste of effort.
Security
JWT vs Session Cookies: Which Should You Use in 2026?
A practical comparison of JWT-based authentication and traditional session cookies — security, scalability, revocation, and which to choose for your app.
JWT Security: Best Practices and Common Mistakes
JSON Web Tokens are everywhere — and so are the security mistakes. This guide covers the pitfalls (alg:none, weak secrets, leaked tokens) and the fixes (short expiration, proper va...
Background
AI / LLMs
Databases
Tutorials
Working with JSON Files in Node.js: Read, Write, and Edit Safely
A practical guide to reading, writing, modifying, and streaming JSON files in Node.js — with atomic writes, error handling, and large-file patterns.
Pretty-Print JSON in the Terminal with jq (and 4 Alternatives)
How to pretty-print, filter, and query JSON from the command line. Five tools compared: jq, python -m json.tool, fx, jless, and gron.
How to Format JSON in JavaScript: Complete Guide
Format JSON in JavaScript using JSON.stringify, in Node.js, in the browser, and via command-line tools. Covers indent options, sort_keys equivalents, and edge cases.
How to Format JSON in Python: 4 Methods Compared
Format and pretty-print JSON in Python using the standard library and popular third-party tools. Examples with json.dumps, command-line use, rich for color output, and orjson for s...
5 Ways to Convert JSON to CSV (and When to Use Each)
Compare five methods for converting JSON to CSV — online tools, Python pandas, jq, Node.js, and PowerShell. With handling for nested objects and arrays.
JSONPath Tutorial: Complete Guide with Examples
Learn JSONPath — the query language for JSON. Wildcards, recursive descent, filters, slices, and real-world examples for extracting data from API responses.
How to Validate JSON Against a Schema (with Examples)
Step-by-step guide to validating JSON against JSON Schema — using online tools, JavaScript (Ajv), Python (jsonschema), and Go. With real-world examples for API payloads.
Understanding JSON Schema: A Complete Guide
JSON Schema lets you describe and validate JSON data. This guide covers the syntax, common keywords, drafts, and real-world examples — from basic type checks to complex composition...