[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Connor Wolf
Connor Wolf added the comment: The problem here is that JSON is *everywhere*, and I only ran into this particular issue after a whole bunch of digging as to why my "JSON" messages were disappearing in some javascript. Basically, with the default the way it is, you have interoperability bombs

[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Ezio Melotti
Ezio Melotti added the comment: This is documented at https://docs.python.org/3/library/json.html#standard-compliance-and-interoperability and https://docs.python.org/3/library/json.html#infinite-and-nan-number-values The default could be changed if we go through a deprecation process, but I'm

[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Connor Wolf
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 `-infin