Group
Extension

Matches 35358

JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/index.t ( view source; MetaCPAN )
ore;
use JQ::Lite;

my $json = q({
  "users": [
    {"name": "Alice", "age": 30},
    {"name": "Bob", "age": 25},
    {"name": "Carol", "age": 35}
  ],
  "tags": ["perl", "json", "cli"],
  "title": "j
,
  "flags": [true, false, true]
});

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

my @object_index = $jq->run_query($json, '.users | index({"name":"Bob","age":25})');
is(scalar @object_index, 1, 'object index returns si
ray_index = $jq->run_query($json, '.tags | index("perl")');
is($array_index[0], 0, 'scalar array search returns zero-based index');

my @string_index = $jq->run_query($json, '.title | index("lite")');
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/match.t ( view source; MetaCPAN )
use strict;
use warnings;
use Test::More;
use JQ::Lite;

my $json = q({
  "users": [
    { "name": "Alice", "email": "alice@example.com" },
    { "name": "Bob",   "email": "bob@admin.com" },
    { "na
q->run_query($json, '.users[] | select(.name match "Bob")');
my @matched_admin = $jq->run_query($json, '.users[] | select(.email match "^bob@")');
my @matched_fail  = $jq->run_query($json, '.users[] |
JQ-Lite ( S/SH/SHINGO/JQ-Lite-1.43.tar.gz, SHINGO, 2025; MetaCPAN )
JQ-Lite/JQ-Lite-1.38/t/count.t ( view source; MetaCPAN )
ew;

my $json = <<'JSON';
{
  "users": [
    { "name": "Alice", "age": 30 },
    { "name": "Bob",   "age": 22 },
    { "name": "Carol", "age": 19 }
  ]
}
JSON

my @res1 = $jq->run_query($json, '.users
 | count');
is_deeply(\@res1, [3], 'count users');

my @res2 = $jq->run_query($json, '.users[] | select(.age > 25) | count');
is_deeply(\@res2, [1], 'count users over 25');

done_testing;
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]
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/CreateResponseObjectRequest.pm ( view source; MetaCPAN )
:CreateResponseObjectRequest;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
Apache2-API ( J/JD/JDEGUEST/Apache2-API-v0.5.0.tar.gz, JDEGUEST, 2025; MetaCPAN )
Apache2-API/lib/Apache2/API/Headers/AcceptCommon.pm ( view source; MetaCPAN )
Apache2::API::Headers::Accept->new( 'text/html;q=0.9,application/json' );
    my $mime = $accept->match( ['text/html', 'application/json'] ); # => 'text/html'

    my $al = Apache2::API::Headers::Acce
 Apache2::API::Headers::Accept->new( 'text/html;q=0.9,application/json' );
    my $prefs  = $accept->preferences; # ['application/json', 'text/html']

If an error occurred, it sets an error that can b
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/ApiDiscoveryResponseEnable.pm ( view source; MetaCPAN )
::ApiDiscoveryResponseEnable;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/ListInvoicesResponse.pm ( view source; MetaCPAN )
Object::ListInvoicesResponse;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/Error.pm ( view source; MetaCPAN )
rvice::Fastly::Object::Error;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/BillingInvoicesApi.pm ( view source; MetaCPAN )
tent-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $he
tent-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $he
tent-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $he
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/DdosProtectionRuleWithStatsAllOf.pm ( view source; MetaCPAN )
ProtectionRuleWithStatsAllOf;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
Daje-Plugin-Tools ( J/JA/JANESKIL/Tools/Daje-Plugin-Tools-0.14.tar.gz, JANESKIL, 2025; MetaCPAN )
Daje-Plugin-Tools/lib/Daje/Controller/ToolsObjectSQL.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
Apache2-API ( J/JD/JDEGUEST/Apache2-API-v0.5.0.tar.gz, JDEGUEST, 2025; MetaCPAN )
Apache2-API/lib/Apache2/API/Headers/Accept.pm ( view source; MetaCPAN )
ion/json');
    my $mime = $accept->match(['text/html', 'application/json']); # => 'text/html'
    # inspect client preferences (by q, desc):
    my $prefs = $a->preferences; # [ 'application/json', '
::Headers::Accept->new( '*/*;q=0.9, application/json;q=0.9' );
    $a->match( [ 'image/png', 'text/html', 'application/json' ] );
    # "application/json"

=head2 3. */* with higher q wins and chooses
 = Apache2::API::Headers::Accept->new( '*/*;q=1.0, application/json;q=0.9' );
    $a->match( [ 'image/png', 'text/html', 'application/json' ] );
    # "image/png"

=head1 LEGACY MATCH PRIORITY

Set C<
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/InlineResponse20010.pm ( view source; MetaCPAN )
:Object::InlineResponse20010;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/ApiDiscoveryResponseBodyGetAllServices.pm ( view source; MetaCPAN )
ryResponseBodyGetAllServices;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
Daje-Plugin-Tools ( J/JA/JANESKIL/Tools/Daje-Plugin-Tools-0.14.tar.gz, JANESKIL, 2025; MetaCPAN )
Daje-Plugin-Tools/lib/Daje/Controller/ToolsParameterValues.pm ( view source; MetaCPAN )
  )->then(sub($result) {
        $self->render(json => { data => $result->{data}, result => => 1 });
    })->catch(sub($err) {
        $self->render(json => { 'result' => 0, data => $err });
    })->w
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/Metadata.pm ( view source; MetaCPAN )
ce::Fastly::Object::Metadata;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/AutomationTokenErrorResponse.pm ( view source; MetaCPAN )
AutomationTokenErrorResponse;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/RequestBodyForCreate.pm ( view source; MetaCPAN )
Object::RequestBodyForCreate;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/Invoice.pm ( view source; MetaCPAN )
ice::Fastly::Object::Invoice;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
    my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));

    return $_hash;
}

# used by JSON for serialization
sub TO_JSON {
    my $self = shift;
    my $
serialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
        my $_json_attribute = $self->attribute_map->{$_key};
        my $_is_nullable = ($self->openapi_nullable->{

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