JQ::Lite

JQ::Lite is a lightweight, pure-Perl JSON query engine inspired by the jq command-line tool.
It provides a simplified jq-like syntax for querying JSON structures from Perl or the command line.

๐Ÿ”ง Features

๐Ÿ›  Installation

perl Makefile.PL
make
make test
make install

๐Ÿš€ Usage

As a Perl module

use JQ::Lite;

my $json = '{"users":[{"name":"Alice"},{"name":"Bob"}]}';
my $jq = JQ::Lite->new;
my @names = $jq->run_query($json, '.users[] | .name');

print join(\"\\n\", @names), \"\\n\";

As a CLI tool

cat users.json | script/jq.pl '.users[] | .name'

๐Ÿ“ฆ Example Input

{
  "users": [
    { "name": "Alice", "age": 30 },
    { "name": "Bob", "age": 25 }
  ]
}

Example Query

cat users.json | script/jq.pl '.users[] | .name'

Output

Alice
Bob

๐Ÿงช Testing

prove -l t/basic.t

๐Ÿ“ License

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

๐Ÿง‘โ€๐Ÿ’ป Author

Kawamura Shingo
pannakoota1@gmail.com

GitHub: https://github.com/kawamurashingo/JQ-Lite