RFC Errata
RFC 7159, "The JavaScript Object Notation (JSON) Data Interchange Format", March 2014
Note: This RFC has been obsoleted by RFC 8259
Source of RFC: json (app)See Also: RFC 7159 w/ inline errata
Errata ID: 3915
Status: Verified
Type: Technical
Publication Format(s) : TEXT
Reported By: Vasiliy Faronov
Date Reported: 2014-03-07
Verifier Name: Pete Resnick
Date Verified: 2014-05-16
Section 12 says:
Since JSON's syntax is borrowed from JavaScript, it is possible to use that language's "eval()" function to parse JSON texts.
It should say:
Since JSON's syntax is borrowed from JavaScript, it is possible to use that language's "eval()" function to parse most (but not all) JSON texts.
Notes:
This wording may be construed as meaning that every compliant JSON text is parseable as JavaScript, which is not the case: <http://timelessrepo.com/json-isnt-a-javascript-subset>. (Actually I would prefer this to be stated clearly elsewhere in the document, e.g. where it says "JSON's design goals were for it to be [...] a subset of JavaScript".)
--VERIFIER NOTES--
As per the above citation, there are characters (in particular line terminators like U+2028 and U+2029) which are permissible in JSON but not permissible in JavaScript. The corrected text makes this clearer.