JSON parser grammar

Christian Plesner Hansen christian.plesner.hansen at gmail.com
Thu Jun 4 01:19:17 PDT 2009

(Sorry for the repeat, my first attempt bounced because I wasn't
subscribed to es-discuss)

> The V8 implementation is a pretty early implementation and I would
> consider all of the issues raised here to be bugs in it.

It is indeed an early implementation but the decision to use the
source parser directly is deliberate.  Because of the way json2.js
works anyone currently using it would get our implementation in the
future and I didn't want to change the behavior in subtle ways under
people's feet.

It's unclear to me from reading this thread if any other browsers
actually implement JSON correctly according to ES5.  If none do, how
sure are we that these changes won't break people's programs?

As for octal literals I agree that they're not a good idea.  However,
adding new special cases to avoid them is a cure worse than the
disease.  It adds to the complexity of the language in an area that is
already dangerously complex.

More information about the es-discuss mailing list