Home » U++ Library support » U++ Core » Jsonize int64 surprise
Re: Jsonize int64 surprise [message #38867 is a reply to message #38865] |
Thu, 24 January 2013 20:21 |
Mindtraveller
Messages: 917 Registered: August 2007 Location: Russia, Moscow rgn.
|
Experienced Contributor |
|
|
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.
But I'd suggest eliminating ANY surprises at all. We have number - we represent as number. But one may disagree with it.
[Updated on: Thu, 24 January 2013 20:26] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Apr 19 22:38:24 CEST 2024
Total time taken to generate the page: 0.03283 seconds
|