Closed
Description
jq is inconsistent in the way it handles squished entities when reading from STDIN:
# sometimes it's able to distinguish them properly
$ echo '1[]' | jq .
1
[]
# ... and sometimes an error is raised:
$ echo '1 +6 1+6' | jq .
1
6
jq: parse error: Invalid numeric literal at line 2, column 0
# and in the case of `nan` it simply skips over the interloper:
$ echo 'nan123 456' | jq .
null
456
Swallowing input silently probably isn't such a good idea.
Incidentally, nan123
was an oss-fuzz idea (so to speak).