Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validation failure: not reporting incomplete JSON as invalid #1305

Closed
stinney opened this issue Jan 8, 2017 · 4 comments
Closed

validation failure: not reporting incomplete JSON as invalid #1305

stinney opened this issue Jan 8, 2017 · 4 comments

Comments

@stinney
Copy link

stinney commented Jan 8, 2017

The json input file "}" produces an error; the input "{" does not.

@pkoppstein
Copy link
Contributor

  1. When reporting a problem, please indicate the jq version number and some details about the environment. A short transcript illustrating the problem is usually helpful.

  2. The problem you describe may already have been resolved. Consider:

$ echo '}' | jq1.3 .
parse error: Unmatched '}' at line 1, column 1

$ echo '{' | jq1.3 .
parse error: Unfinished JSON term

$ /usr/local/bin/jq -V
jq-1.4

$ echo '{' | /usr/local/bin/jq .
parse error: Unfinished JSON term

$ echo '}' | /usr/local/bin/jq .
parse error: Unmatched '}' at line 1, column 1

@yurivict
Copy link

1.5 has this problem.

@wtlangford
Copy link
Contributor

1.5 has this problem, but this is fixed on master.

$ ./jq -V
jq-1.5rc2-174-g597c1f6 # read as: commit hash 597c1f6, which is 174 commits ahead of tag jq-1.5rc2.
$ echo '{' | ./jq .
parse error: Unfinished JSON term at EOF at line 2, column 0
$ echo '}' | ./jq .
parse error: Unmatched '}' at line 1, column 1
$ echo -n '}' | ./jq .
parse error: Unmatched '}' at line 1, column 1
$ echo -n '{' | ./jq .
parse error: Unfinished JSON term at EOF at line 1, column 1

@yurivict
Copy link

yurivict commented Feb 8, 2017

Is there an ETA of the next release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants