The json input file "}" produces an error; the input "{" does not.
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.
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
1.5 has this problem.
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
Is there an ETA of the next release?
Most helpful comment
1.5 has this problem.