itamarst / eliot

Eliot: the logging system that tells you *why* it happened
https://eliot.readthedocs.io
Apache License 2.0
1.1k stars 66 forks source link

Add test to ensure NaN and inf are roundtripped in JSON #411

Closed itamarst closed 5 years ago

itamarst commented 5 years ago

For scientific computing preserving NaN and friends is useful. Currently Python's JSON library already does this, but switching libraries (#372) could impact that:

>>> json.loads(json.dumps(float("nan")))
nan