JSON text is not a subset of PrimaryExpression

Allen Wirfs-Brock allen at wirfs-brock.com
Wed Jul 19 16:40:45 UTC 2017


> On Jul 18, 2017, at 9:36 PM, Mark S. Miller <erights at google.com> wrote:
> 
> I argued for that in the old es3.1 days. IIRC so did Mike Samuel and Crock. The pain of doing it now would be higher than it would have been then. Nevertheless, I would still be in favor.

Why do we care?  ECMAScript and JSON are two distinct languages with their own distinct and standardized definitions. And we should be well past the time where JS eval is considered to be an acceptable way to process an alleged JSON text.

The “issue” raised is one word in a non-normative paragraph.  It can be corrected with a one word change.  Replace

"Valid JSON text is a subset of the ECMAScript PrimaryExpression syntax as modified by Step 4 above.”

with

"Valid JSON text is a variant of the ECMAScript PrimaryExpression syntax as modified by Step 4 above.”

(note that the second sentence of this paragraph is important in that it further clarifies that the validity of a JSON text is defined by ECMA-404)

I don’t see such a trivial issue would motivate us start making normative changes to either standard when run the risk that such changes would opening the door for other proposal to “fix JSON” in some manner or another.

Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170719/349ffbca/attachment-0001.html>


More information about the es-discuss mailing list