JSON Validation and Common Errors/Object keys must be quoted

Bare identifiers are invalid in JSON.

Section: Common parse failures

Object keys must be quoted

json
json
{ "enabled": true }
Explanation

`{ enabled: true }` is valid in some JavaScript objects but not in JSON.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Common parse failures
Single quotes are invalid
Strings and keys must use double quotes.
OpenIn sheetjsonsame section
Trailing commas are invalid
Do not leave a comma after the last item.
OpenIn sheetjsonsame section
Raw newlines inside strings are invalid
Use `\n` rather than an actual line break inside a string literal.
OpenIn sheetjsonsame section
Rewrite valid JSON in normalized form
Read and immediately re-emit clean JSON.
OpenIn sheetbashsame section
Validate with jq
Parse a file and fail if JSON is invalid.
OpenIn sheetbash1 tag match
Validate with Python json.tool
Check syntax and pretty-print if valid.
OpenIn sheetbash1 tag match