I may be wrong. But my point is that JSON is used mostly in Web development. In our case this means:
Quote:
server[U++] <-> client[javascript]
And javascript natively supports integers up to 64-bit length (actually 53-bit, see below). So should we in U++.
This article http://cdivilly.wordpress.com/2012/04/11/json-javascript-lar ge-64-bit-integers/
corrects that Javascript actually support integers up to 2^53. So if we really want to be close to standards here, we should check not INT_MAX, but 2^53 for stringification.
Well, but that actually is exactly what I propose (I just got 56 wrong, it is indeed 53).
Quote:
But I'd suggest eliminating ANY surprises at all. We have number - we represent as number. But one may disagree with it.
Well, there seems to be no 100% correct solution, but I think that lost precision would not be a good thing as well...