On 11 February 2015 at 11:40, Bo Thorsen <[email protected]> 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
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to