3 ms·
From my reading, literally the only change between RFC 7159 and RFC 8259 is that the latter mandates an UTF-8 encoding. Checking Appendix A "Changes from RFC 71
by masklinn 9y ago
From my reading, literally the only change between RFC 7159 and RFC 8259 is that the latter mandates an UTF-8 encoding. Checking Appendix A "Changes from RFC 7159" mostly confirms it:
* Section 1.2 has been updated to reflect the removal of a JSON specification from ECMA-262, to make ECMA-404 a normative reference, and to explain the particular meaning of "normative".
* Section 1.3 has been updated to reflect errata filed against RFC 7159, not RFC 4627.
* Section 8.1 was changed to require the use of UTF-8 when transmitted over a network.
* Section 12 has been updated to increase the precision of the description of the security risk that follows from using the ECMAScript "eval()" function.
* Section 14.1 has been updated to include ECMA-404 as a normative reference.
* Section 14.2 has been updated to remove ECMA-404, update the version of ECMA-262, and refresh the errata list.
So
* RFC 8259 requires UTF-8 encoding (for network transmissions)
* ECMA-404 has been upgraded from Informative (14.2) to Normative (14.1)
* Wording has been improved or fixed in some cases
- rurban 9y agoYou need to read between the lines and know the history. Restricting to UTF-8 and disallowing the previous allowed UT-16 and UTF-32 BOM's (which my JSON library is the only one which did support that), is the most prominent change, yes. What is troubling to me is that they now prefer relaxed RFC 7159 over strict RFC 4627. The RFC 7159 relaxed mode was a troubled update which harms security, and it should not be turned on by default. And whilst they support now the insecure relaxed variant, they didn't clarify the still problematic points in the spec. MUST disallow duplicate keys, or MAY? It's not specified, or specified twice contradicting itself. Same for broken UTF-8 encodings. Error or warn or silence? It's still much better than the YAML spec though. Minor nitpicks.