⊹ FAST.JSON.VIEWER guide ← back to viewer

The JSON test suite that certifies Fast JSON Viewer

Every release runs against 124 hand-built fixtures — well-formed files that must parse and malformed files that must be rejected at the exact failing byte. Here is the complete list, with the small files shown inline and linked to the spec each one probes.

json conformance test suite rfc 8259 validation

Why a test suite?

JSON looks trivial, but the grammar in RFC 8259 / ECMA-404 has corners that real parsers get wrong: a leading zero (01) is illegal, -0 is legal, a bare .5 is not a number, lone surrogate escapes are malformed, and comments do not exist. Nicolas Seriot catalogued how badly parsers diverge on these in “Parsing JSON is a Minefield” and the companion JSONTestSuite. Fast JSON Viewer keeps its own fixtures in the same spirit.

The contract is simple. Files named pass-* are valid JSON and the viewer must accept them. Files named fail-* are malformed and the viewer must reject them, reporting the byte offset of the first error. The same fixtures drive the Node CLI validator and the Playwright end-to-end suite, and the page below is the browser-facing version you can click through live.

Each filename links to #jsonString=…, which loads those exact bytes straight into the viewer — so you can watch a pass- file render or a fail- file get flagged. The RFC 8259 §N tag on each entry jumps to the clause of the spec it exercises.

Valid (must accept) Invalid (must reject) Performance Manifests

Valid JSON — parser must accept (45)

Every file here is well-formed JSON. The viewer must parse it without error and render it. Each filename is a link that opens the exact bytes live in the viewer.

Invalid JSON — parser must reject (74)

Every file here is malformed on purpose. The viewer must reject it and report the byte offset of the first problem — accepting any of these would be a conformance bug. Open any link to watch the validator flag it.

Performance fixtures (1)

Large, real-world-shaped documents used to measure throughput rather than correctness. These are over 1 KB, so they are summarised rather than inlined.

Test suite manifests (4)

Aggregate manifests that bundle the individual fixtures above into runnable suites for the CLI and Playwright harness.

This is the static, readable companion to the interactive test suite. New to the format? Start with What is JSON? A simple JSON example.

⊹ Open the viewer Live test suite