Parse Infinity and -Infinity
Closed this issue · 1 comments
ajdavis commented
I lied about my previous PR being my last for a while.
Python's standard JSON module parses "Infinity" and "-Infinity":
>>> json.loads('{"x": Infinity}')
{u'x': inf}
>>> json.loads('{"x": -Infinity}')
{u'x': -inf}
Would you like a PR, similar to the NaN feature, for Infinity? Perhaps it should be hidden behind the same flag as the NaN feature is? That would be analogous to Python's JSON module, which uses the same "allow_nan" flag to control NaN, Infinity, and -Infinity parsing.