Add a json_set_serializer() function to allow the string output of a json_object to be customized.

This commit is contained in:
Eric Haszlakiewicz committed 2012-09-02 15:21:56 -05:00
1 parent f74e8f8f9b
commit 38f421a2e7
8 files changed
+214 -10

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
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