NAME
JQ::Lite - A lightweight jq-like JSON query engine in Perl
VERSION
Version 0.05
SYNOPSIS
use JQ::Lite;
my $jq = JQ::Lite->new;
my @results = $jq->run_query($json_text, '.domain[] | .name');
for my $r (@results) {
print encode_json($r), "\n";
}
DESCRIPTION
JQ::Lite is a minimal Perl module that allows querying JSON data using a simplified jq-like syntax.
Currently supported features:
Dot-based key access (e.g. .users[].name)
Optional key access with ? (e.g. .nickname?)
Array indexing and flattening (e.g. .users[0], .users[])
Built-in functions: length, keys
select(...) filters with comparison and logical operators
METHODS
new
my $jq = JQ::Lite->new;
Creates a new JQ::Lite instance.
run_query
my @results = $jq->run_query($json_text, $query);
Runs a query string against the given JSON text.
REQUIREMENTS
This module uses only core Perl modules:
JSON::PP
SEE ALSO
AUTHOR
Kawamura Shingo <pannakoota1@gmail.com>
LICENSE
Same as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 285:
=cut found outside a pod block. Skipping to next block.