JSON parser grammar

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Wed Jun 3 22:02:56 PDT 2009

>-----Original Message-----
>From: es5-discuss-bounces at mozilla.org [mailto:es5-discuss-
>>>  - unquoted property names, matching <IdentifierName>, in
>>>   object literals.
>> Why? Had JSON been defined after ES5, no doubt it would have accepted
>> these. But that's spilled milk under the bridge on which the train has
>> already passed.
>This has nothing to do with ES5. It is about the fact that there is a
>*lot* of nonconformant pseudo-JSON out there that has unquoted property
>names. Rejecting it will make the ES5 JSON parser significantly less
>and less interoperable.

The IE8 implementation of JSON.parse does not allow unquoted property names. While I have seen reports regarding several issues with the IE8 implementation,(for example, one site that allowed use of single quotes as string quotes within JSON text) I have yet to hear any complaints about not allowing unquoted property names. This doesn't prove that such pseudo-JSON doesn't exist but it may indicate that it isn't a serious problem.

More information about the es5-discuss mailing list