JSON parser grammar

Brendan Eich brendan at mozilla.org
Wed Jun 3 22:11:11 PDT 2009

On Jun 3, 2009, at 10:02 PM, Allen Wirfs-Brock wrote:

>> -----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
>> useful
>> 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.

Same here, we've yet to receive such a bug report.. I can believe  
almost any claim about funny content on the web (not ha-ha funny,  
either), but it would be great to have some links to public instances  
of JSON data with unquoted property names.

David-Sarah, can you cite any?


More information about the es5-discuss mailing list