3 ms·
Not standard. > Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted. - http://www.ecma-international
by comex 12y ago
Not standard.
> Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted.
- http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf http://www.ecma-international.org/publications/files/ECMA-ST...
- schoen 12y agoHuh, the Python json module documentation admits that the Python behavior isn't standards-compliant. https://docs.python.org/2/library/json.html#standard-compliance-and-interoperability https://docs.python.org/2/library/json.html#standard-complia... It does claim that the support for arbitrary precision numbers is standards-compliant. Looking at the ECMA standard briefly, that seems to be correct to me: the official JSON grammar does allow arbitrary-precision, and disclaims restrictions on how a particular programming language interprets numbers. I have to admit that I'm kind of concerned about the NaN and Infinity issue because I thought there was more uniformity among JSON parsers about what is or isn't legitimate JSON.