Commit 57acf1b4 authored by Liang Qi's avatar Liang Qi Committed by The Qt Project
Browse files

QtCore: fix the number precision in QJsonDocument.toJson()


In JSON, any number is stored in double. We need to make sure we
keep the maximum possible number precision for integer number. In
IEEE 754 double format, the significand precision is 53 bits(52
explicityly stored).

Autotest is included. qint64 and double work fine.

Task-number: QTBUG-28467
Change-Id: I7f857671c50e4334e9329c778f9b4f090f490540
Reviewed-by: default avatarSune Vuorela <sune@vuorela.dk>
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
parent abaaaea0
No related merge requests found
Showing with 66 additions and 13 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment