JSON parser grammar

Oliver Hunt oliver at apple.com
Tue Jun 22 18:34:49 PDT 2010

On Jun 22, 2010, at 6:06 PM, Douglas Crockford wrote:

> On 6/22/2010 5:28 PM, Garrett Smith wrote:
>> Most of the questions on Grammar were answered in this thread,
>> however, the question of  U+0009 as a JSONStringCharacter remains. All
>> major browsers allowi U+0009 in JSONString. What should the capability
>> test check? If all major browsers parse without error '  "\t"  ' to
>> result in a string with the character U+0009, then the feature test
>> can detect that failing and use the fallback.
>> JSON.parse accepting U+0009 in strings is now part of public API and
>> major libraries rely on that. Is going to be codified?
>> To summarize, the pressing questions are:
>> 1) Is the spec going to change to allow U+0009? And if it isn't, why not? and
>> 2) What should the fallback for JSON.parse use? Should it:
>>  (a) go by the letter of the spec and perform a capability test to
>> expect that an error is thrown for JSON.parse('  "\t"  '), or
>>  (b) go with what seems to be a de facto standard and allow U+0009 as
>> JSONStringCharacter?
> This has already been asked and answered. We are going with a strict interpretation of the JSON standard.

I believe that implication is that the strict JSON spec should be changed.  Currently all implementations of "JSON" are incorrect in the respect, which to me implies that the spec is wrong.


> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

More information about the es-discuss mailing list