Debian Patches

Status for gojq/0.12.13-2

Patch Description Author Forwarded Bugs Origin Last update
0001-fix-cli-treat-json-v2-truncated-input-error-as-unexp.patch fix(cli): treat json v2 truncated-input error as unexpected EOF (Go 1.27)

Go 1.27 backs encoding/json with the v2 implementation, which returns a
*json.SyntaxError ("unexpected end of JSON input") from (*Decoder).Token when
the stream is truncated mid-value, where Go 1.26 and earlier returned io.EOF.
The --stream path in cli/stream.go only recognized io.EOF, so on Go 1.27 the
raw v2 error leaked out with a different message and caret column, breaking the
"stream option with unterminated input" test.

Normalize both representations to io.ErrUnexpectedEOF via a small helper that
also accepts a *json.SyntaxError whose offset is at the end of consumed input,
so genuine mid-stream syntax errors are unaffected. Output is now identical on
Go 1.24 through 1.27. Fixes #301.
Vladimir Babin <vovababin@gmail.com> yes debian backport, https://github.com/itchyny/gojq/pull/302/commits/342f74aa83c57b831b13d5d94df10c6ad2fb343d 2026-08-23

All known versions for source package 'gojq'

Links