New submission from Connor Wolf:
The Python library JSON library doesn't emit JSON by default.
Basically, `json.dumps(float('nan'))` produces something that kind of looks
like json, but isn't (specifically, `'NaN'`). Valid JSON must be `null`.
JSON *does not allow `NaN`, `infinity`, or `-infinity`.
`json.dump[s]` has the parameter `allow_nan`, but it's `False` by default, so
basically it's not actually JSON by default.
The default for emitting JSON should actually emit JSON. `allow_nan` must be
`True` by default.
----------
components: Library (Lib)
messages: 258179
nosy: Connor.Wolf
priority: normal
severity: normal
status: open
title: Python JSON module doesn't actually produce JSON
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26105>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com