Is it specified anywhere how big JSON integers can be? I\'m guessing that they\'re limited to normal (32 bit) ints, but I can\'t find anywhere that that\'s written down. I n
I just did the following empirical test using Chrome (v.23 on Mac) Console:
> var j = JSON.parse("[999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999]")
undefined
> j[0]
1e+228
If JSON is passed through HTTP then the number will be converted in String from Java in any case and then the issue could be only in Javascript.
From ECMAScript Language Specification 4.3.19:
4.3.19 Number value
primitive value corresponding to a double-precision 64-bit binary format IEEE 754 value
NOTE A Number value is a member of the Number type and is a direct representation of a number.
Which is what defined in wikipedia Double-precision floating-point format.