Skip to content

nan123 #3023

Closed
Closed
nan123#3023
@pkoppstein

Description

@pkoppstein

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions