Jq: `jq` allows raw tab character in strings, which seems to be an extension to main JSON specs

Created on 1 Dec 2017  路  8Comments  路  Source: stedolan/jq

As it would be braking change, I think there should be additional flag --strict that would allow only documents that are valid JSON according to spec, with no extensions.

bug fixed in master

Most helpful comment

It would be nice to see jq to be ran against JSON test suite by Nicolas Seriot.

Actually, this has been done: see e.g. https://github.com/stedolan/jq/issues/1264

All 8 comments

@hauleth We once had a bug where jq allowed unquoted newlines in strings. We did not consider fixing that a breaking change.

./jq .
"       "
parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 1, column 3

That's jq in master. What version did you see this bug in?

Current stable 1.5 (installed via HomeBrew).

It would be nice to see jq to be ran against JSON test suite by Nicolas Seriot.

Thanks for the link.

It would be nice to see jq to be ran against JSON test suite by Nicolas Seriot.

Actually, this has been done: see e.g. https://github.com/stedolan/jq/issues/1264

Ah, thx for pointing that out @pkoppstein.

Was this page helpful?
0 / 5 - 0 ratings