Joined October 2013
·
Posted to
Python's json module does not always produce valid JSON
over 1 year
ago
You could file this as a bug on the official python bug listing. That listing handles not just core python but also the standard libraries as well.
Achievements
39 Karma
0 Total ProTip Views
Charity
Fork and commit to someone's open source project in need
Komodo Dragon
Have at least one original repo where Java is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Yep. I feel you. I read over the JSON spec before your first reply and it did indeed say that Infinity+- and NaNs were not valid JSON. This prompted within me the same curiosity as to why the Python JSON module was designed to output invalid JSON. So I agree with you when you say that your inclination would have been for the JSON module to dump actually valid JSON and not JavaScript instead.