[Development] JSON 64 bit int

Giuseppe D'Angelo dangelog at gmail.com
Wed Feb 11 13:27:02 CET 2015

On 11 February 2015 at 12:12, Bo Thorsen <bo at vikingsoft.eu> wrote:
> It's so easy to say we just follow the standard. But I have two current
> projects where my customers say they send me a 64 bit database ID in a JSON
> value. Converting those through a double might work, but can you guarantee
> this?

No, because IEEE754 64-bit floating point numbers can't represent all
64 bit integers... the right solution, from a JSON point of view, is
not sending a number but a string.

Giuseppe D'Angelo

More information about the Development mailing list