5 min read
JSON vs JSON5: What’s the Difference?
Compare strict JSON with the more forgiving JSON5 format and choose the right one for your data.
Strict data versus authored configuration
JSON is a compact interchange format with deliberately strict syntax. JSON5 adds conveniences such as comments, trailing commas, and unquoted identifier keys.
Those conveniences help people maintain configuration, but many APIs and standard parsers accept only JSON.
Compatibility comes first
Use JSON at system boundaries unless every consumer explicitly supports JSON5. A file that works in a JSON5-aware build tool can still fail when sent to a browser API or another service.
