[Development] JSON 64 bit int

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


On 11 February 2015 at 11:40, Bo Thorsen <bo at vikingsoft.eu> wrote:
> {"i":1e33} gives a 0 if I convert the number to int (which is fair
> enough). If I convert to variant, it gives me a double.

Because it _is_ a double, given that JSON is a subset of Javascript,
and numbers in Javascript are IEEE754 64bit floating point numbers.
(And it's also a strict subset, given that JSON omits the handling of
+/- infinity and NaN...). I'm not too happy with the fact that
QJsonValue has "int" in its API...

-- 
Giuseppe D'Angelo



More information about the Development mailing list