chenguoping
1446572997
add testcases of object and token
2019-12-27 15:07:00 +08:00
Eric Haszlakiewicz
b1ad748842
Extend test_double_serializer to check NaN and Infinity handling.
2019-11-22 22:56:33 -05:00
Eric Haszlakiewicz
485f2a02c7
Issue #486 : append a missing ".0" to negative double values too.
2019-05-28 02:44:22 +00:00
Eric Haszlakiewicz
d5da847f51
PR#394: don't always append the ".0" if the double value rounds to zero because some custom formats *will* include it (e.g. %.2f).
...
Also try to accomodate formats to explicitly exclude the decimal (e.g. %.0f).
2017-12-24 13:45:52 -05:00
Eric Haszlakiewicz
23e064ad29
Fix test_double_serializer expected output.
2017-06-18 18:34:41 +00:00
Eric Haszlakiewicz
1a94c70336
Add a json_c_set_serialization_double_format() function to set the *library-wide* format for how doubles are written to a serialized JSON output.
2017-06-18 18:12:07 +00:00
Matthias Schiffer
c2b004ba0e
Make default double serializer ignore userdata again
...
The user might want to use the userdata for something different, so the
serializer should ignore it by default.
Explicitly setting the serializer to json_object_double_to_json_string will
still make it interpret the userdata as a format string.
2016-05-29 11:24:55 +02:00