3 ms·
He did explain why: "This provides both future-proofing against later changes in ECMAScript (adding keywords), and simplifies the grammar for conforming parser
by tlrobinson 18y ago
He did explain why:
"This provides both future-proofing against later changes in ECMAScript (adding keywords), and simplifies the grammar for conforming parsers. Simpler grammars mean less opportunity for errors and non-conformant implementations."
If it didn't require quotes, currently valid JSON may not be valid in the future if a new keyword which was use as a JSON object key was used unquoted. And there's the added complexity of supporting both quoted and unquoted keys.
- axod 17y agoA data format should NOT be concerned with language keywords.
- jsonscripter 17y agoUnless the data format is written in a language...