mirror of
https://github.com/json-c/json-c.git
synced 2026-03-30 02:19:06 +08:00
Added a json_object_new_double_s() convenience function to allow an exact string representation of a double to be specified when creating the object and use it in json_tokener_parse_ex() so a re-serialized object more exactly matches the input.
Add json_object_free_userdata() and json_object_userdata_to_json_string() too.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
new_obj.to_string()=[ 1.200000, 3.400000, 123456.780000, 5.000000, 23000000000.000000 ]
|
||||
new_obj.to_string()=[1.2,3.4,123456.78,5.0,23000000000.0]
|
||||
new_obj.to_string()=[ 1.2, 3.4, 123456.78, 5.0, 2.3e10 ]
|
||||
new_obj.to_string()=[1.2,3.4,123456.78,5.0,2.3e10]
|
||||
|
||||
@@ -5,7 +5,7 @@ new_obj.to_string()="ABC"
|
||||
new_obj.to_string()=null
|
||||
new_obj.to_string()=true
|
||||
new_obj.to_string()=12
|
||||
new_obj.to_string()=12.300000
|
||||
new_obj.to_string()=12.3
|
||||
new_obj.to_string()=[ "\n" ]
|
||||
new_obj.to_string()=[ "\nabc\n" ]
|
||||
new_obj.to_string()=[ null ]
|
||||
|
||||
Reference in New Issue
Block a user