Pure Go implementation of jq
input_filename
function for the commanddef g: 1; def f(g): g; f(2)
)first((0, 0) | first(0))
)null|error
and error(null)
to behave like empty
(null | [0, error, error(null), 1]
)1 / 1 * 1000000000000000000000
)(-1) % 10000000000
)--slurp
) and raw input option (--raw-input
) to keep newlines~/.jq
, $ORIGIN/../lib/gojq
, $ORIGIN/lib
where $ORIGIN
is the directory where the executable is located in@base64d
to allow input without padding charactersfromdate
, fromdateiso8601
to parse date time strings with timezone offsethalt_error
to print error values without prefixsub
, gsub
to allow the replacement string emitting multiple values\b
and \f
in stringsindex
, rindex
, indices
, transpose
, and walk
functionsdistroless/static:debug
gojq.NewIter
function for creating a new iterator from values$ARGS.named
for listing command line variablesdebug
and stderr
functions from the librarystderr
function for jq compatibility[0][-infinite:infinite], [0][:1e20]
)distroless
image for Docker base imageGOJQ_COLORS
environment variable to configure individual colors--color-output
(-C
) option even if NO_COLOR
is setgojq.ValueError
interface for custom internal functionsinfinite
(infinite-infinite | isnan
)nan
(nan < nan
)implode
([-1] | implode
)strftime
, strptime
for time zone offsets$HOME/.jq
to module paths when $HOME
is unset1?/1
)@foo?
)0..[empty]
)%#v
query.String()
ModuleLoader
optional--tab
)gojq.Marshal
function for jq-flavored encodingint64
to int
on 32-bit architectureiter.Next()
does not normalize NaN
and infinities anymore. Library users should take care of them. To handle them for encoding as JSON bytes, use gojq.Marshal
. Also, iter.Next()
does not clone values deeply anymore for performance reason. Users must not update the elements of the returned arrays and objects.strftime
, strptime
functions with jqinfinite
to a string""[:{}]
)1 % 0.1
)CREDITS
file in artifactsparticiple
library to goyacc
generated parser. as $x | { $x: 1 }
)|=
) with try
catch
expression?
) with alternative operator (//
) in map_values
functiongojq.NewModuleLoader
function for library users