Common JSON Syntax Errors
JSON is strict about quotes, commas, and values. These examples show several common syntax errors and their standard JSON forms.
Use double-quoted strings and keys
JSON requires double quotes around property names and string values. JavaScript-style single quotes are not valid JSON.
{ 'name': 'Ada' } // invalid
{ "name": "Ada" } // validRemove trailing commas
A comma may separate members, but the last member cannot have a trailing comma.
{ "active": true, } // invalid
{ "active": true } // validUse JSON values
Valid values are objects, arrays, strings, numbers, true, false, and null. Comments, undefined, and NaN are not JSON values.
Validate and format
Formatting can make valid JSON easier to read, but it cannot repair unknown intent in malformed input. The JSON Formatter & Validator reports parse errors and supports standard JSON only.