Common JSON mistakes

Most broken JSON comes from a small set of mistakes. The faster you can recognize them, the less time you spend fighting request bodies, fixtures, and copied payloads.

1. Trailing commas

JavaScript may tolerate them in some contexts, but standard JSON does not.

2. Single quotes

JSON strings and keys require double quotes.

3. Unquoted keys

Object keys like name: "Ada" are valid JavaScript object syntax, not valid JSON.

4. Missing brackets

A truncated payload or manual edit can easily leave an object or array unfinished.

5. Comments

Comments are not part of standard JSON and will break parsers.

FAQ

Why does JSON look valid when it is not?

Because it often resembles JavaScript objects or config syntax that has looser rules.

What should I check first?

Quotes, commas, comments, and brackets are the best first pass.

Can formatting help me spot problems?

Yes. Once the JSON is valid, formatting makes review much easier.

Where can I get error-specific help?

Use the dedicated error guides under the Errors section.