mirror of
https://github.com/json-c/json-c.git
synced 2026-03-13 18:19:06 +08:00
13 lines
748 B
Plaintext
13 lines
748 B
Plaintext
Test setting, then resetting a custom serializer:
|
|
my_object.to_string(standard)={ "abc": 12, "foo": "bar" }
|
|
my_object.to_string(custom serializer)=Custom Output
|
|
Next line of output should be from the custom freeit function:
|
|
freeit, value=123
|
|
my_object.to_string(standard)={ "abc": 12, "foo": "bar" }
|
|
Check that the custom serializer isn't free'd until the last json_object_put:
|
|
my_object.to_string(custom serializer)=Custom Output
|
|
Next line of output should be from the custom freeit function:
|
|
freeit, value=123
|
|
Check that the custom serializer does not include nul byte:
|
|
my_object.to_string(custom serializer)={"double": 1}
|