An Empirical Analysis of JSON Parse Errors Across Four Parsers
This research note measures the behavior of Node.js JSON.parse, Python json.loads, jq 1.7.1, and JSON5 2.2.3 across 10,000 deterministic malformed JSON documents spanning ten error classes. It reports acceptance rates and whether each parser supplies actionable position information. The main findings are that JSON5 accepts 50% of the corpus because four malformed classes are valid JSON5 syntax, jq accepts all generated leading-zero numbers, Node reports a position in 88% of its rejections, and Python reports line and column information in all tested rejections. The note provides practical implications for parser-aware diagnostics and clearly labels the corpus as synthetic and version-dependent.Project: JsonMind — https://www.jsonmind.com/
Authors
- Liyao Liu
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-27
- DOI
- https://doi.org/10.5281/zenodo.24566834
- Primary Topic
- Logic, programming, and type systems
- Type
- preprint