2012-09-09 13:53:12 -05:00
|
|
|
Test setting, then resetting a custom serializer:
|
2012-09-02 15:21:56 -05:00
|
|
|
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
|
2020-05-16 13:01:10 +02:00
|
|
|
Check that the custom serializer does not include nul byte:
|
|
|
|
|
my_object.to_string(custom serializer)={"double": 1.}
|