GNOME Bugzilla – Bug 724319
json_gvariant_deserialize() doesn't decode doubles that json_gvariant_serialize() has encoded
Last modified: 2015-01-26 06:42:14 UTC
json_gvariant_deserialize() doesn't decode doubles that json_gvariant_serialize() has encoded. This is because whole number doubles are encoded without a dot, and thus decode as integers in the JsonNode, rather than doubles. We need to account for this in json_to_gvariant_recurse().
Created attachment 269071 [details] Test case demonstrating the problem Build this test case with the command in the first comment.
Created attachment 269072 [details] [review] json-gvariant: Parse json doubles that are whole numbers The json gvariant serializer encodes whole number doubles without a dot. The deserializer needs to be able to parse these as well. Fix problem, and add test cases.
Review of attachment 269072 [details] [review]: LGTM
Attachment 269072 [details] pushed as 80e44db - json-gvariant: Parse json doubles that are whole numbers