How we test
By Santhi · Last capture October 9, 2026
Every error message quoted on JSON Error Messages, Decoded was printed by a real parser. None of them are typed by hand or copied from another website. This page says how, so you can check it or run it yourself.
The runtimes
11 runtimes, captured on October 9, 2026. Browsers run headless in Playwright; Node, Bun and Python run in their official Docker images.
| Runtime | Parser | Version |
|---|---|---|
| Chrome 151 | V8 | 151.0.7922.34 |
| Firefox 153 | SpiderMonkey | 153.0 |
| Safari 26 (WebKit) | JavaScriptCore | 26.5 |
| Node 24 | V8 | 24.21.0 |
| Node 22 | V8 | 22.23.3 |
| Node 20 | V8 | 20.20.2 |
| Node 18 | V8 | 18.20.8 |
| Bun | JavaScriptCore | 1.4.2 |
| Python 3.13 | CPython json | 3.13.16 |
| Python 3.12 | CPython json | 3.12.15 |
| Python 3.10 | CPython json | 3.10.22 |
Safari is captured with Playwright's WebKit build, which uses the same JavaScriptCore parser as Safari. It is not the Safari app itself.
The inputs
Each runtime parses the same 18 broken inputs: JSON.parse in JavaScript, json.loads in Python. The message each one prints is saved word for word.
- An HTML page where JSON was expected
- An empty string
- A comma after the last item in an object
- Single-quoted keys and strings
- An object key with no quotes
- A // comment
- NaN as a value
- JSON cut off in the middle
- A byte order mark before the JSON
- A Python dict printed with print() (True, None, 'quotes')
- Two JSON documents one after the other
- A real line break inside a string
- undefined as a value
- Two values with no comma between them
- The text [object Object]
- A Windows path with single backslashes
- The word undefined on its own, from JSON.parse(undefined)
- Infinity as a value
Running it yourself
The capture is one shell script. It needs Docker, runs one container at a time, and writes every message to a JSON file that the error pages are built from. The script, the inputs and every captured message (as JSON and CSV, free to reuse under CC BY 4.0) are public in json-error-messages on GitHub.
git clone https://github.com/smartjson-io/json-error-messages.git cd json-error-messages && sh capture/run.sh
The same code in your own browser console gives the same message as the Chrome, Firefox or Safari row, as long as your browser version is close to the one in the table. Messages do change between versions: Node 18 and Node 20 word several of them differently, which is why each version gets its own row.
What the automated tests check
- Messages still match. A unit test parses every input with the Node version running the tests and fails if the message differs from the saved capture.
- Every message is explained. A unit test pastes each captured message into the decoder on /errors/ and fails if the real cause is not in the top three answers.
- Repairs are safe. Tests for JSON Repair check that every repaired output parses, that valid JSON comes back unchanged, that Windows paths keep their backslashes, and that an HTML page, [object Object] and an empty input are refused rather than guessed at.
- The tools work like a visitor uses them. Playwright browser tests open the site, paste input, press the buttons and read the output, on every change before it ships.
Corrections
If a message on this site does not match what your browser or language prints, or an explanation is wrong, tell us with the runtime, its version and the input. We re-run the capture, fix the page, and list the fix in the changelog with its date.