4 ms·
It would lose its "backwards compatible" property though.
by esnard 5y ago
It would lose its "backwards compatible" property though.
- lifthrasiir 5y agoThis can be solved if you base JSON5 on I-JSON (RFC 7493) instead of JSON (RFC 8259). Many (but not all) JSON implementations actually expect I-JSON, at least for object keys.
- dane-pgp 5y agoHaving a defined, predictable behaviour in JSON5 doesn't seem like it would break backwards compatibility with JSON's undefined, unpredictable behaviour. I don't think someone with an existing JSON document would complain that a JSON5 parser behaved "too predictably" when interpreting their document.
- brundolf 5y agoIt could change, and therefore break, the real-world behavior of a given parser that some code is knowingly or unknowingly relying on.
- dane-pgp 5y agoSo could switching to another JSON parser. The response of the parser writer should be "I detected a bug in your code for you. You're welcome."
- brundolf 5y agoThis attitude willfully ignores real-world constraints. There are plenty of "shoulds", but at the end of the day, changing behavior is changing behavior. Maybe it's worth it, maybe it isn't. But it's never free.