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.
@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.
Most helpful comment
Actually, this has been done: see e.g. https://github.com/stedolan/jq/issues/1264