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

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

An Empirical Analysis of JSON Parse Errors Across Four Parsers

Liyao Liu
Zenodo (CERN European Organization for Nuclear Research)
Logic, programming, and type systems
preprint

An Empirical Analysis of JSON Parse Errors Across Four Parsers

Liyao Liu
preprint en

Abstract

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/

Zenodo (CERN European Organization for Nuclear Research)
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon