Eric Haszlakiewicz
66d91fdf86
The split of json_object into type-specific sub-structures is now functionally complete.
Remove all of the temporary defines, structures, old compat fuctions, extra fields, etc... that were needed during the conversion to a split set of json_object_* structures.
5 years ago
Eric Haszlakiewicz
9ecb1222bd
Kick json_type_int and json_type_double out of struct json_object.
Clean up the code in json_object_new_* a bit by dropping unnecesary json_object_base variables.
5 years ago
Björn Esser
dd040ba446
tests: Fix test_double_serializer without thread-local storage.
5 years ago
dota17
8b162c4b89
clang-format the files
5 years ago
chenguoping
424b315ce0
pointer types discards qualifiers
5 years ago
chenguoping
1446572997
add testcases of object and token
5 years ago
Eric Haszlakiewicz
25aedddcdf
Fix memory leaks in test_double_serializer, and make sure all tests return 0 at the end of main().
5 years ago
Eric Haszlakiewicz
b1ad748842
Extend test_double_serializer to check NaN and Infinity handling.
5 years ago
Eric Haszlakiewicz
68abf12afa
Issue #498 : Fix a memory leak bug introduced in test_double_serializer in 485f2a02
by adding a json_object_put call.
6 years ago
Pierce Lopez
634900d270
tests: appease -Wwrite-strings
6 years ago
Eric Haszlakiewicz
485f2a02c7
Issue #486 : append a missing ".0" to negative double values too.
6 years ago
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).
7 years ago
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.
8 years ago
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.
9 years ago