Why JSON is strict on purpose
JSON was designed as a simple, unambiguous data-interchange format, so its strictness is a feature rather than a limitation β it guarantees that any conforming parser, in any language, interprets the same file identically.
Where JSON errors usually come from
Hand-edited config files, text copy-pasted from JavaScript or Python (where quoting rules differ), trailing commas left over from editing, and // comments (which plain JSON does not support at all) account for the large majority of validation failures.
Frequently Asked Questions
Can JSON have comments?
No, standard JSON has no comment syntax. Some tools support JSON5 or JSONC extensions, but a plain .json file with // or /* */ comments will fail a strict validator.
Why does my JSON work in JavaScript but fail validation?
JavaScript object literals are more permissive β unquoted keys, single quotes, trailing commas, and comments are all valid JS syntax, but none of them are valid JSON, so code that runs fine in a .js file can still fail a strict JSON parser.