This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Connor.Wolf
Recipients Connor.Wolf
Date 2016-01-13.23:15:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452726913.68.0.934947942911.issue26105@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-01-13 23:15:13Connor.Wolfsetrecipients: + Connor.Wolf
2016-01-13 23:15:13Connor.Wolfsetmessageid: <1452726913.68.0.934947942911.issue26105@psf.upfronthosting.co.za>
2016-01-13 23:15:13Connor.Wolflinkissue26105 messages
2016-01-13 23:15:13Connor.Wolfcreate