JJSONForge
Get JSONForge

JsonForge · JSON errors

Trailing comma in a JSON array

The same rule as objects: no comma after the last element.

The smallest input that causes it

[1, 2, 3,]

JSON.parse on that gives, verbatim:

Unexpected token ']', "[1, 2, 3,]" is not valid JSON

The fix

[1, 2, 3]

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