Accepting Quote by Douglas Crockford
“A JSON decoder MAY accept and ignore comments.”
About This Quote
Source Specification: JSON RFC 8259, 2017
A JSON parser may allow comments without affecting data parsing.
In simple terms: Comments can be ignored by JSON parsers.
Allow comments for readability, but ensure they don't alter data.
Themes
Mood
Type
When to use this quote
- configuration files
- API responses
- debugging
- documentation
- data exchange
Key Concepts
Questions to Reflect On
- Should you permit comments in production JSON?
- How to handle comments across different languages?
Comments may cause incompatibility with strict parsers.