Group
Extension

Matches 35359

JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/merge_objects.t ( view source; MetaCPAN )
use strict;
use warnings;
use Test::More;
use JSON::PP;
use JQ::Lite;

my $json = <<'JSON';
{
  "items": [
    { "name": "Widget", "value": 1 },
    { "value": 2, "active": true },
    { "nested": { "
],
  "single": { "foo": "bar" },
  "no_hashes": ["alpha", "beta"]
}
JSON

my $jq = JQ::Lite->new;

my @merged = $jq->run_query($json, '.items | merge_objects');
is_deeply(
    \@merged,
    [
        
e => JSON::PP::true,
            nested => { id => 42 },
        }
    ],
    'merge_objects folds arrays of objects into one hash with later values winning',
);

my @single = $jq->run_query($json, '.
Daje-Plugin-Tools ( J/JA/JANESKIL/Tools/Daje-Plugin-Tools-0.14.tar.gz, JANESKIL, 2025; MetaCPAN )
Daje-Plugin-Tools/lib/Daje/Controller/ToolsTableObjects.pm ( view source; MetaCPAN )
pkey)->then(sub($result) {
        $self->render(json => { data => $result->{data}, result => 1 });
    })->catch(sub($err) {
        $self->render(json => { result => 0, data => $err });
    })->wait
ey)->then(sub($result) {
        $self->render(json => { data => $result->{data}, result => => 1 });
    })->catch(sub($err) {
        $self->render(json => { result => 0, data => $err });
    })->wai
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/scalars.t ( view source; MetaCPAN )
 $json = <<'JSON';
{
  "items": [
    "text",
    42,
    true,
    null,
    {"note": "object"},
    [1, 2, 3]
  ],
  "flag": false
}
JSON

my $jq = JQ::Lite->new;
my @results = $jq->run_query($json,
;
isa_ok($results[2], 'JSON::PP::Boolean', 'scalars preserves boolean objects');
ok(!defined $results[3], 'scalars keeps null values as undef');

@results = $jq->run_query($json, '.items | scalars');
alars yields no output for array containers');

@results = $jq->run_query($json, '.flag | scalars');
isa_ok($results[0], 'JSON::PP::Boolean', 'scalars passes through scalar booleans');
ok(!$results[0]
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/sort_desc.t ( view source; MetaCPAN )
Q::Lite;

my $json = q({
  "nums": [1, 9, 3, 2],
  "words": ["apple", "pear", "banana"],
  "mixed": ["10", "2", "30"]
});

my $jq = JQ::Lite->new;

my @desc_nums   = $jq->run_query($json, '.nums | sor
t_desc');
my @desc_words  = $jq->run_query($json, '.words | sort_desc');
my @desc_mixed  = $jq->run_query($json, '.mixed | sort_desc');

is_deeply($desc_nums[0],  [9, 3, 2, 1], 'numeric sort descendin
Daje-Database-Model ( J/JA/JANESKIL/Tools/Daje-Database-Model-0.09.tar.gz, JANESKIL, 2025; MetaCPAN )
Daje-Database-Model/lib/Daje/Database/Model/Super/DocumentBuilder.pm ( view source; MetaCPAN )
has 'fields' => "document_builder_pkey, editnum, insby, insdatetime, modby, moddatetime, document_json, status";
has 'primary_key_name' => "document_builder_pkey";
has 'table_name' => "document_builde
Daje-Plugin-Tools ( J/JA/JANESKIL/Tools/Daje-Plugin-Tools-0.14.tar.gz, JANESKIL, 2025; MetaCPAN )
Daje-Plugin-Tools/lib/Daje/Controller/ToolsObjects.pm ( view source; MetaCPAN )
ey)->then(sub($result) {
        $self->render(json => { data => $result->{data}, result => => 1 });
    })->catch(sub($err) {
        $self->render(json => { 'result' => 0, data => $err });
    })->w
p()->then(sub($result) {
        $self->render(json => { data => $result->{data}, result => => 1 });
    })->catch(sub($err) {
        $self->render(json => { 'result' => 0, data => $err });
    })->w
Net-EANSearch ( J/JA/JANW/Net-EANSearch-1.10.tar.gz, JANW, 2025; MetaCPAN )
Net-EANSearch/lib/Net/EANSearch.pm ( view source; MetaCPAN )
package Net::EANSearch;

use strict;
use warnings;

use LWP;
use JSON;
use URL::Encode;
use MIME::Base64 qw(decode_base64);

require Exporter;

our @ISA = qw(Exporter);

# Items to export into callers
 19;
our $BULGARIAN = 20;
our $GREEK = 21;

my $BASE_URI = 'https://api.ean-search.org/api?format=json&token=';
my $MAX_API_TRIES = 3; # retry, eg. on 429 error

sub new {
	my $class = shift;
	my $tok
my $lang = shift || 1;

	my $json_str = $self->_apiCall($self->{base_uri} . "&op=barcode-lookup&ean=$ean&language=$lang");
	my $json = decode_json($json_str);
	return $json->[0];
}

sub isbnLookup {
	
App-Greple-xlate ( U/UT/UTASHIRO/App-Greple-xlate-0.9915.tar.gz, UTASHIRO, 2025; MetaCPAN )
App-Greple-xlate/lib/App/Greple/xlate/gpt4.pm ( view source; MetaCPAN )
t-4.1', temp => '0.0', max => 3000, sub => \&gpty,
	      prompt => <<END
Translate the following JSON array into %s.
For each input array element, output only the corresponding translated element at 
pond to input element n.
Output only the translated elements or unchanged tags/blank strings as a JSON array.
Do not leave any unnecessary spaces or tabs at the end of any array element in your output
ult as a JSON array and nothing else.
Your entire output must be valid JSON.
Do not include any explanations, code blocks, or text outside of the JSON array.
If you cannot produce a valid JSON array, 
Daje-Plugin-Tools ( J/JA/JANESKIL/Tools/Daje-Plugin-Tools-0.14.tar.gz, JANESKIL, 2025; MetaCPAN )
Daje-Plugin-Tools/lib/Daje/Controller/ToolsTableObjectDatatypes.pm ( view source; MetaCPAN )
p()->then(sub($result) {
        $self->render(json => { data => $result->{data}, result => => 1 });
    })->catch(sub($err) {
        $self->render(json => { result => 0, data => $err });
    })->wai
Acrux ( A/AB/ABALAMA/Acrux-0.07.tar.gz, ABALAMA, 2025; MetaCPAN )
Acrux/lib/Acrux/Pointer.pm ( view source; MetaCPAN )
);

=head1 HISTORY

See C<Changes> file

=head1 TO DO

See C<TODO> file

=head1 SEE ALSO

L<Mojo::JSON::Pointer>

=head1 AUTHOR

Serż Minus (Sergey Lepenkov) L<https://www.serzik.com> E<lt>abalama@cp
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/comma.t ( view source; MetaCPAN )
->new;

my $simple_json = '{"a":1,"b":2}';
my @simple = $jq->run_query($simple_json, '.a, .b');
is_deeply(\@simple, [1, 2], 'comma emits multiple top-level values');

my $users_json = '[{"name":"Alice
query($users_json, '.[] | (.name, .age)');
is_deeply(\@flat, ['Alice', 30, 'Bob', 25], 'comma branches run against identical inputs in pipelines');

my @arrays = $jq->run_query($users_json, '.[] | [.n
 ],
    'comma preserves evaluation order for each input');

my @prefixed = $jq->run_query($users_json, '(["name","age"]), (.[] | [.name, .age])');
is_deeply(
    \@prefixed,
    [
        ['name', 'a
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/abs.t ( view source; MetaCPAN )
gs;
use Test::More;
use JQ::Lite;

my $json = q({
  "number": -10,
  "numbers": [-3, 4, -5, "n/a"]
});

my $jq = JQ::Lite->new;

my @scalar = $jq->run_query($json, '.number | abs');
is($scalar[0], 10,
 'abs converts scalar numbers to absolute value');

my @array = $jq->run_query($json, '.numbers | abs');
is_deeply(
    $array[0],
    [3, 4, 5, 'n/a'],
    'abs converts numeric array entries and lea
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/pick.t ( view source; MetaCPAN )
::Lite->new;

sub run_query {
    my ($json, $query) = @_;
    return [ $jq->run_query($json, $query) ];
}

subtest 'pick on single object' => sub {
    my $json    = '{"name":"Alice","age":30,"city":
"Paris"}';
    my $results = run_query($json, 'pick("name", "age")');

    is_deeply(
        $results->[0],
        { name => 'Alice', age => 30 },
        'returns subset of keys'
    );
};

subtest
ay of objects' => sub {
    my $json    = '{"users":[{"name":"Alice","age":30,"email":"alice@example.com"},{"name":"Bob","age":27}]}';
    my $results = run_query($json, '.users | pick("name", "email"
App-Greple-xlate ( U/UT/UTASHIRO/App-Greple-xlate-0.9915.tar.gz, UTASHIRO, 2025; MetaCPAN )
App-Greple-xlate/lib/App/Greple/xlate/gpt5.pm ( view source; MetaCPAN )
 Custom Tools Support

GPT-5 supports custom tools that can receive plaintext payloads instead
of JSON, enabling more flexible integration with external systems.

=head3 Context-Free Grammar (CFG)

Al
<App::Greple::xlate>

=item * L<App::cdif::Command> - For gpty command execution

=item * L<JSON> - For JSON array processing

=back

=head1 SEE ALSO

=over 4

=item * L<App::Greple::xlate>

=item * L
verbosity => 'low', max_completion_tokens => 4000,
	      prompt => <<END
Translate the following JSON array into %s.
For each input array element, output only the corresponding translated element at 
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/split.t ( view source; MetaCPAN )
use strict;
use warnings;
use Test::More;
use JQ::Lite;

my $json = q({
  "text": "foo,bar,baz",
  "users": [
    { "name": "Alice" },
    { "name": "Bob" }
  ],
  "mixed": ["alpha beta", null, ["inne
y @comma = $jq->run_query($json, '.text | split(",")');
is_deeply($comma[0], [qw(foo bar baz)], 'split(",") breaks comma-separated string');

my @chars = $jq->run_query($json, '.users[0].name | split(
ars[0], [qw(A l i c e)], 'split("") returns individual characters');

my @array = $jq->run_query($json, '.mixed | split(" ")');
my $expected = [
    [qw(alpha beta)],
    [],
    [[qw(inner)]],
    { 
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/drop.t ( view source; MetaCPAN )


my $json = q({
  "numbers": [1, 2, 3, 4],
  "user": { "name": "Alice" }
});

my $jq = JQ::Lite->new;

my @drop_0 = $jq->run_query($json, '.numbers | drop(0)');
my @drop_2 = $jq->run_query($json, '.n
umbers | drop(2)');
my @drop_5 = $jq->run_query($json, '.numbers | drop(5)');
my @non_array = $jq->run_query($json, '.user | drop(1)');

is_deeply($drop_0[0], [1, 2, 3, 4], 'drop(0) keeps all elements
Data-Random-String-Matches ( N/NH/NHORNE/Data-Random-String-Matches-0.04.tar.gz, NHORNE, 2025; MetaCPAN )
Data-Random-String-Matches/scripts/generate_index.pl ( view source; MetaCPAN )
use warnings;
use autodie qw(:all);

use File::Glob ':glob';
use File::Slurp;
use File::stat;
use JSON::MaybeXS;
use POSIX qw(strftime);
use Readonly;

Readonly my %config => (
	github_user => 'nigelh
r_db => 'cover_db/cover.json',
	output => 'cover_html/index.html'
);

# Read and decode coverage data
my $json_text = read_file($config{cover_db});
my $data = decode_json($json_text);

my $coverage_pc
ob("coverage_history/*.json");

# Cache historical data instead of reading for each file
my %historical_cache;
for my $hist_file (@history_files) {
	my $json = eval { decode_json(read_file($hist_file)
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/lib/JQ/Lite/Expression.pm ( view source; MetaCPAN )
package JQ::Lite::Expression;

use strict;
use warnings;

use JSON::PP ();    # lightweight decoder for string literals
use Scalar::Util qw(looks_like_number);

# Internal constant used to signal that
       next;
        }

        if ($char eq '"') {
            my ($consumed, $value) = _consume_json_string($expr, $i);
            return unless defined $consumed;
            $i += $consumed;
    
ar;
        $i++;
    }

    $path =~ s/\s+$//;

    return ($i - $start, $path);
}

sub _consume_json_string {
    my ($expr, $start) = @_;

    my $i   = $start;
    my $len = length $expr;
    my $
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/lib/JQ/Lite/Util.pm ( view source; MetaCPAN )
package JQ::Lite::Util;

use strict;
use warnings;

use JSON::PP ();
use List::Util qw(sum min max);
use Scalar::Util qw(looks_like_number);
use MIME::Base64 qw(encode_base64 decode_base64);
use Encod
;

my $JSON_DECODER     = JSON::PP->new->utf8->allow_nonref;
my $FROMJSON_DECODER = JSON::PP->new->utf8->allow_nonref;
my $TOJSON_ENCODER   = JSON::PP->new->utf8->allow_nonref;

sub _encode_json {
   
eturn $TOJSON_ENCODER->encode($value);
}

sub _decode_json {
    my ($text) = @_;

    if (defined $text && is_utf8($text, 1)) {
        $text = encode('UTF-8', $text);
    }

    return $JSON_DECODER
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/nth.t ( view source; MetaCPAN )
ngs;
use Test::More;
use JQ::Lite;

my $json = <<'JSON';
{
  "users": ["Alice", "Bob", "Carol"]
}
JSON

my $jq = JQ::Lite->new;

is_deeply([$jq->run_query($json, '.users | nth(0)')], ['Alice'], 'nth(0
jq->run_query($json, '.users | nth(1)')], ['Bob'], 'nth(1) is Bob');
is_deeply([$jq->run_query($json, '.users | nth(2)')], ['Carol'], 'nth(2) is Carol');
is_deeply([$jq->run_query($json, '.users | nth

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.