After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637244 - Generator dump_value() rounds double values loosing precision
Generator dump_value() rounds double values loosing precision
Status: RESOLVED FIXED
Product: json-glib
Classification: Core
Component: Generator
0.12.x
Other Mac OS
: Normal normal
: ---
Assigned To: json-glib-maint
json-glib-maint
Depends on:
Blocks:
 
 
Reported: 2010-12-14 17:37 UTC by alberto
Modified: 2012-03-13 22:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description alberto 2010-12-14 17:37:33 UTC
The json-generator dump_value() function should use the the '%f' modifier in the g_ascii_formatd() rather than '%g' or allow to serialise double values properly.

For example 1292340068292173.000000 gets serialized as 1.29234e+15 loosing precision.
Comment 1 Emmanuele Bassi (:ebassi) 2011-01-10 11:17:49 UTC
thanks, fixed in master.
Comment 2 André Klapper 2012-03-13 22:08:50 UTC
[Fixing Default QA assignee for json-glib - see 613232#c1. Sorry for bugmail noise.]