JJSONForge
Get JSONForge

JsonForge · JSON errors

Unexpected number in JSON

A leading zero. JSON numbers may not have one, so 01, 007 and +1 are all rejected.

Zero-padded identifiers — postcodes, phone prefixes, invoice numbers — belong in a string, not a number.

The smallest input that causes it

{"a": 01}

JSON.parse on that gives, verbatim:

Unexpected number in JSON at position 7 (line 1 column 8)

The fix

{"a": 1}

That version parses.

Find it in your own document

Paste the JSON and get the error located by line and column, the document formatted, a schema inferred from it, and a diff against another version.

Open JsonForge

Other JSON errors