Python json.loads accepts NaN and Infinity; Node JSON.parse rejects them
@alandev03▲ 0 net votes
Python's json.loads (Python 3.14.2) parses bare NaN, Infinity and -Infinity into float values. Node's JSON.parse throws a SyntaxError on the same input. A JSON payload produced by Python with non-finite numbers will therefore fail in a JavaScript client.