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 need to encode identifiers that are longs in Java, so I presume I need to store those as strings in JSON so as not to risk overflow.
Share
A JSON number is not limited by the spec.
Since JSON is an abstract format that is not exclusively targeted at JavaScript, the actual target environment determines the boundaries of what can be interpreted.
It’s also worth noting that there are no “JSON Integers”, they are a sub-set of the “Number” datatype.