mirror of
https://github.com/json-c/json-c.git
synced 2026-03-18 12:39:06 +08:00
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 lines
249 B
Plaintext
9 lines
249 B
Plaintext
Test default serializer:
|
|
obj.to_string(standard)=0.5
|
|
Test default serializer with custom userdata:
|
|
obj.to_string(userdata)=0.5
|
|
Test explicit serializer with custom userdata:
|
|
obj.to_string(custom)=test
|
|
Test reset serializer:
|
|
obj.to_string(reset)=0.5
|