JSON parser grammar

Breton Slivka zen at zenpsycho.com
Wed Jun 3 21:01:29 PDT 2009

On Thu, Jun 4, 2009 at 11:25 AM, Waldemar Horwat <waldemar at google.com> wrote:
> Which means that it would be impossible to round-trip them through JSON.
>  Anything that uses the existing syntax already has a set interpretation as
> an existing ECMAScript object.

Sorry to bungle into this conversation, but just out of curiosity,
does there exist a specification that requires a JSON number to be
interpreted as an ecmascript Number* ? Would it be violating any spec
if a future javascript implementation interpreted the numbers in a
JSON object as some other Number type? The way I see it, it is already
a problem that some JSON supporting languages cannot round trip some
of their native number types. Was type accurate round tripping one of
the original goals of JSON? Has it become a goal?

*as in the IEEE 64-bit floating point type that javascript uses by default.

More information about the es-discuss mailing list