[Web-SIG] Time a for JSON parser in the standard library?

John Millikin jmillikin at gmail.com
Sun Apr 6 05:54:01 CEST 2008


(messed up CC on last email, re-sending to list)

On Sat, Apr 5, 2008 at 7:01 PM, Robert Brewer <fumanchu at aminus.org> wrote:

> Re: Representation of Fractional Numbers, there are two solutions. If you
> return decimals, people using JS on the other end are going to call
> float(d). If you return floats, people not using JS on the other end are
> going to go use a different library. I suggest the former is more acceptable
> than the latter for a stdlib offering. Allowing the caller of parse() to
> choose would be even better.


I don't understand what you mean, here. generate ([decimal.Decimal ('1.1')])
-> '[1.1]', so a JavaScript user calling eval() on it would get a standard
JavaScript float object without having to call float() explicitly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/web-sig/attachments/20080405/e527cee3/attachment.htm 


More information about the Web-SIG mailing list