Found with libFuzzer
Parsing the following json:
will work correctly. Calling value.dump() on the resulting object will return:
However, when parsing this again, this will be parsed as an integer, and so calling dump on the resulting value will return:
Could fix by either enforcing dump to be -0.0 or be aggressive and dump negative zeros as just 0.
Found with libFuzzer
Parsing the following json:
-0.0will work correctly. Calling
value.dump()on the resulting object will return:-0However, when parsing this again, this will be parsed as an integer, and so calling dump on the resulting value will return:
0Could fix by either enforcing dump to be
-0.0or be aggressive and dump negative zeros as just0.