JSON parser grammar
david-sarah at jacaranda.org
Wed Jun 3 21:03:54 PDT 2009
John Cowan wrote:
> Mark S. Miller scripsit:
>> 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.
> FWIU, JSON doesn't allow unquoted keys because that would implicate
> the list of ES3 reserved words in the definition. Let's not go there.
I did not suggest treating reserved words differently:
JSONString : JSONValue
[not for output] IdentifierName : JSONValue
This is just making the specification for the ES5 JSON parser consistent
with what almost all real-world JSON parsers already do.
David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
More information about the es5-discuss