NAME

jq-lite - minimal jq-style JSON filter (pure Perl)

SYNOPSIS

jq-lite [options] filter [file ...]

cat users.json | jq-lite '.users[].name'
jq-lite '.items | sort | first' data.json
jq-lite -R -s -c 'split("\n")' logfile.txt

DESCRIPTION

jq-lite is a lightweight, jq-style JSON filter implemented entirely in pure Perl.

It is intended for use on systems where jq is unavailable but Perl is present, providing awk/sed-like convenience for processing JSON and YAML data.

Features include:

  • jq-style filters: dot traversal, pipes, basic selectors, and commonly used built-in functions

  • Command-line options such as -R, -r, -c, -a, --slurp, --null-input, --from-file, --arg, --argjson, --rawfile, and --yaml

  • Pure Perl implementation with no XS, no external binaries, and no runtime dependencies beyond core modules

jq-lite aims to be compatible with jq where practical, but does not implement all jq features.

It is not a drop-in replacement for jq, but a pragmatic alternative for constrained or minimal environments.

In particular, some advanced expressions and comparisons may behave differently from jq.

OPTIONS

-r, --raw-output

Output strings without JSON quoting.

-R, --raw-input

Read input as raw text, treating each line as a separate value. Use -s together with -R to process the entire input as a single string.

-s, --slurp

Read the entire input into a single value.

-a, --ascii-output

Escape non-ASCII characters in output.

--arg name value

Define a string variable.

--argjson name value

Define a JSON variable.

--yaml

Force YAML input parsing.

-h, --help

Display help and exit.

SEE ALSO

JQ::Lite, jq(1), awk(1), sed(1), perl(1)

HOMEPAGE

https://kawamurashingo.github.io/JQ-Lite/

AUTHOR

川村慎吾 (Shingo Kawamura)

COPYRIGHT AND LICENSE

This software is released under the same terms as Perl itself.

DISCLAIMER

jq-lite is provided "as is", without warranty of any kind.