This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I parsed and then reserialized a JSON file containing records of the form: {"_id":5285039,"name":"Black Bear Spring","country":"US","coord":{"lon":-110.288139,"lat":31.386209}} The serialized form of the record (well, a similar record...) looks like this: {"name":"Gray County","coord":{"lon":-100.802002,"lat":35.416698},"country":"US","_id":5.52243E6}, Turning a 7-digit ID value into exponential notation seems unfortunate, but it appears to be what our spec requires. I wonder if we could change the rules so that a numeric value that is exactly equal to some integer Z is serialized by casting to xs:integer and then applying the string() function to the integer? At the very least we should permit such a serialization. (Perhaps only if the integer is within some implementation-defined range not smaller than -10^15 to +10^15).
The WG agreed to allow implementers to serialize numbers using any legal JSON lexical form. The change has been applied to the spec.