Common JSON Errors and How to Fix Them
JSON has a small spec but a big habit of failing in confusing ways. This guide walks through the failures people actually run into.
Last reviewed: 2026-08-03
Trailing commas
JSON does not allow a comma before a closing } or ]. This is the number-one JSON error.
// broken
{"a": 1, "b": 2,}
// fixed
{"a": 1, "b": 2}Single quotes instead of double quotes
JSON keys and string values must be double-quoted. Single quotes are JavaScript syntax.
// broken
{'name': 'Ada'}
// fixed
{"name": "Ada"}Number precision
JSON numbers are IEEE 754 doubles. Integers larger than 2^53 silently lose precision.
// safe
{"tweetId": "1234567890123456789"}