On 10 Dec 2013, at 12:39, James Clark <[email protected]> wrote: > The only thing that makes me hesitate is that I could imagine implementations > that distinguish integers and floats, and use C-style rules to distinguish > the two. For example, 1 is an integer but 1.0 or 1e0 is a float. I don't know > whether any such implementations exist.
Absolutely, they do, and they all differ in how exactly they do the distinction. http://www.ietf.org/mail-archive/web/json/current/msg01523.html This is a cause of real interoperability problems. The question is how to find out of that maze of different interpretations. There is no way this can be done so that none of them “breaks”. It may seem natural to stick to the way numbers are interpreted in many programming languages that distinguish floating point values from integer values. However, JavaScript doesn’t so it can’t supply guidance. And that leads to exactly the problem documented in https://jira.talendforge.org/browse/TDI-26517 — interoperability broken when a non-distinguishing sender accidentally chooses the representation that triggers the wrong behavior at the receiver. It is probably better to suggest handling 1.0 as 1. When we are done with that, there is still negative zero. http://www.ietf.org/mail-archive/web/json/current/msg01661.html Grüße, Carsten _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

