[docs] [issue19871] json module won't parse a float that starts with a decimal point

Mark Dickinson report at bugs.python.org
Wed Dec 4 21:12:02 CET 2013

Mark Dickinson added the comment:

> Oddly, with all of the strictness in JSON, the exponent-marker "e"
> can be upper- or lower-case

I'd guess that the aim is that common floating-point output formats from a variety of languages are valid JSON.  That would also explain why both '+' and '-' are allowed on the exponent, but only '-' on the significand, and why leading zeros are permitted on the exponent but not the significand.


Python tracker <report at bugs.python.org>

More information about the docs mailing list