Closed
Description
Describe the bug
Jq does not accept nan
, but accepts -nan
.
To Reproduce
echo nan | jq .
parse error: Invalid literal at line 2, column 0
echo -nan | jq .
null
echo NaN | jq .
null
echo -NaN | jq .
null
Expected behavior
Not sure if jq should accept nan
, or reject -nan
. I would vote for rejecting -nan
, as some popular applications like MongoDB do.
Environment (please complete the following information):
- OS: Kubuntu 19.04
- jq version: jq-1.5-1-a5b5cbe