Make default double serializer ignore userdata again

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.
This commit is contained in:
Matthias Schiffer
2016-05-29 04:54:38 +02:00
parent 7ae5c3f7a6
commit c2b004ba0e
6 changed files with 81 additions and 8 deletions

View File

@@ -0,0 +1,8 @@
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