jless
jless copied to clipboard
Parse error with NaN, Infinity, -Infinity
By default Python's json module allows NaN and Infinity when serialising to json:
>>> import json
>>> json.dumps({'a':float('nan'), 'b':float('inf')})
'{"a": NaN, "b": Infinity}'
Though technically this isn't complient JSON, it would be nice if jless was more permissive to allow the viewing of these files?:
>>> echo '{"x": NaN}' | jless
Unable to parse input: "Parse error"