Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Date
Msg-id EB252E7E-9E65-45CA-B1A8-A8AE16D9DC9A@phlo.org
Whole thread Raw
In response to Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON  (Florian Pflug <fgp@phlo.org>)
List pgsql-hackers
On Jul25, 2011, at 02:03 , Florian Pflug wrote:
> On Jul25, 2011, at 00:48 , Joey Adams wrote:
>> Should we follow the JavaScript standard for rendering numbers (which
>> my suggestion approximates)?  Or should we use the shortest encoding
>> as Florian suggests?
>
> In the light of the above, consider my suggestion withdrawn. I now think
> we should just follow the JavaScript standard as closely as possible.
> As you said, it's pretty much the same as your suggestion, just more precise
> in the handling of some corner-cases like infinity, nan, +/-0, some
> questions of leading and trailing zeros, ...

Just FYI, I browsed through the ECMA Standard you referenced again, and realized
that they explicitly forbid JSON numeric values to be NaN or (-)Infinity
(Page 205, Step 9 at the top of the page). RFC 4627 seems to take the same stand.

I fail to see the wisdom in that, but it's what the standard says...

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Next
From: Robert Haas
Date:
Subject: Re: Policy on pulling in code from other projects?