Group
Extension

Matches 35358

Mojo-SQLite ( D/DB/DBOOK/Mojo-SQLite-3.009.tar.gz, DBOOK, 2022; MetaCPAN )
Mojo-SQLite/lib/Mojo/SQLite/Results.pm ( view source; MetaCPAN )
package Mojo::SQLite::Results;
use Mojo::Base -base;

use Mojo::Collection;
use Mojo::JSON 'from_json';
use Mojo::Util 'tablify';

our $VERSION = '3.009';

has [qw(db sth)];

sub new {
  my $self = sh
  my @json_names = keys %{$self->{expand}{json}};
    for my $r (@rows) { $r->{$_} = from_json $r->{$_} for grep { $r->{$_} } @json_names }
  } else {
    my $cols = $self->columns;
    my @json_idxs 
= grep { $self->{expand}{json}{$cols->[$_]} } 0..$#$cols;
    for my $r (@rows) { $r->[$_] = from_json $r->[$_] for grep { $r->[$_] } @json_idxs }
  }
  
  return @rows;
}

1;

=head1 NAME

Mojo::SQLi
GraphQL ( E/ET/ETJ/GraphQL-0.54.tar.gz, ETJ, 2022; MetaCPAN )
GraphQL/lib/GraphQL.pm ( view source; MetaCPAN )
(<<'EOF');
  type Query {
    helloWorld: String
  }
  EOF
  post '/graphql' => sub {
    send_as JSON => execute(
      $schema,
      body_parameters->{query},
      { helloWorld => 'Hello world!' }
GraphQL ( E/ET/ETJ/GraphQL-0.54.tar.gz, ETJ, 2022; MetaCPAN )
GraphQL/lib/GraphQL/Role/FieldsEither.pm ( view source; MetaCPAN )
 Types::Standard -all;
use JSON::MaybeXS;
with qw(GraphQL::Role::FieldDeprecation);

our $VERSION = '0.02';
use constant DEBUG => $ENV{GRAPHQL_DEBUG};
my $JSON_noutf8 = JSON::MaybeXS->new->utf8(0)->al
(', ', @argtuples).')' if @argtuples;
    $line .= ': ' . $type->to_string;
    $line .= ' = ' . $JSON_noutf8->encode(
      $type->perl_to_graphql($field->{default_value})
    ) if exists $field->{de
   my @directives = map {
      my $args = $_->{arguments};
      my @argtuples = map { "$_: " . $JSON_noutf8->encode($args->{$_}) } keys %$args;
      '@' . $_->{name} . (@argtuples ? '(' . join(', '
uSAC-MIME ( D/DR/DRCLAW/uSAC-MIME-v0.2.2.tar.gz, DRCLAW, 2022; MetaCPAN )
uSAC-MIME/lib/uSAC/MIME.pm ( view source; MetaCPAN )
woff2

application/java-archive                         jar war ear
application/json                                 json
application/mac-binhex40                         hqx
application/msword       
Acme-CPANModules-CLI-Sort ( P/PE/PERLANCAR/Acme-CPANModules-CLI-Sort-0.002.tar.gz, PERLANCAR, 2022; MetaCPAN )
Acme-CPANModules-CLI-Sort/lib/Acme/CPANModules/CLI/Sort.pm ( view source; MetaCPAN )
w of others, please drop me a message.

_
    entries => [
        {
            summary => 'Sort JSON objects by key field(s)',
            module => 'App::PipeFilter',
            script => 'jsort',
se drop me a message.

=head1 ACME::CPANMODULES ENTRIES

=over

=item * L<App::PipeFilter> - Sort JSON objects by key field(s)

Author: L<RCAPUTO|https://metacpan.org/author/RCAPUTO>

Script: L<jsort>
GraphQL ( E/ET/ETJ/GraphQL-0.54.tar.gz, ETJ, 2022; MetaCPAN )
GraphQL/lib/GraphQL/Role/FieldDeprecation.pm ( view source; MetaCPAN )
Moo::Role;
use GraphQL::MaybeTypeCheck;
use Types::Standard -all;
use JSON::MaybeXS;

our $VERSION = '0.02';
my $JSON_noutf8 = JSON::MaybeXS->new->utf8(0)->allow_nonref;

=head1 NAME

GraphQL::Role::F

  return $line if !$value->{is_deprecated};
  $line .= ' @deprecated';
  $line .= '(reason: ' . $JSON_noutf8->encode($value->{deprecation_reason}) . ')'
    if $value->{deprecation_reason} ne
      $
GraphQL ( E/ET/ETJ/GraphQL-0.54.tar.gz, ETJ, 2022; MetaCPAN )
GraphQL/lib/GraphQL/Plugin/Type/DateTime.pm ( view source; MetaCPAN )
doc(<<'EOF');
  type Query { dateTimeNow: DateTime }
  EOF
  post '/graphql' => sub {
    send_as JSON => execute(
      $schema,
      body_parameters->{query},
      { dateTimeNow => sub { DateTime-
GraphQL-Client ( C/CC/CCM/GraphQL-Client-0.605.tar.gz, CCM, 2022; MetaCPAN )
GraphQL-Client/lib/GraphQL/Client/CLI.pm ( view source; MetaCPAN )
tOptionsFromArray);
use GraphQL::Client;
use JSON::MaybeXS;
use Text::ParseWords;
use namespace::clean;

our $VERSION = '0.605'; # VERSION

my $JSON = JSON::MaybeXS->new(canonical => 1);

sub _croak {
s->{filter}) {
        eval { require JSON::Path::Evaluator } or die "Missing dependency: JSON::Path\n";
        my @values = JSON::Path::Evaluator::evaluate_jsonpath($data, $filter);
        if (@val
code('UTF-8', $_) } @args if grep { /\P{ASCII}/ } @args;

    my %options = (
        format  => 'json:pretty',
        unpack  => 0,
    );

    GetOptionsFromArray(\@args,
        'version'         
GraphQL ( E/ET/ETJ/GraphQL-0.54.tar.gz, ETJ, 2022; MetaCPAN )
GraphQL/lib/GraphQL/Plugin/Type.pm ( view source; MetaCPAN )
doc(<<'EOF');
  type Query { dateTimeNow: DateTime }
  EOF
  post '/graphql' => sub {
    send_as JSON => execute(
      $schema,
      body_parameters->{query},
      { dateTimeNow => sub { DateTime-
Mojo-SQLite ( D/DB/DBOOK/Mojo-SQLite-3.009.tar.gz, DBOOK, 2022; MetaCPAN )
Mojo-SQLite/lib/Mojo/SQLite.pm ( view source; MetaCPAN )
'names', {name => 'Daniel'})->last_insert_id;
  
  # JSON roundtrip
  say $db->query('select ? as foo', {json => {bar => 'baz'}})
    ->expand(json => 'foo')->hash->{foo}{bar};

  # Select one row at 
te->new('sqlite:test.db') };

  get '/' => sub ($c) {
    my $db = $c->sqlite->db;
    $c->render(json => $db->query(q{select datetime('now','localtime') as now})->hash);
  };

  app->start;

In this 
additional features to the L<SQL::Abstract>
query methods in L<Mojo::SQLite::Database> such as C<-json> and
C<limit>/C<offset>. The C<for> feature is not applicable to SQLite queries.

  $sql->db->sel
GraphQL-Client ( C/CC/CCM/GraphQL-Client-0.605.tar.gz, CCM, 2022; MetaCPAN )
GraphQL-Client/lib/GraphQL/Client/http.pm ( view source; MetaCPAN )
%$request};

    if ($method eq 'GET' || $method eq 'HEAD') {
        $data->{variables} = $self->json->encode($data->{variables}) if $data->{variables};
        my $params  = www_form_urlencode($data
{sep}${params}#/ or $url .= "${sep}${params}";
    }
    else {
        my $encoded_data = $self->json->encode($data);
        $options->{content} = $encoded_data;
        $options->{headers}{'content


sub _handle_error {
    my $self = shift;
    my ($resp) = @_;

    my $data    = eval { $self->json->decode($resp->{content}) };
    my $content = $resp->{content} // 'No content';
    my $reason  
GraphQL ( E/ET/ETJ/GraphQL-0.54.tar.gz, ETJ, 2022; MetaCPAN )
GraphQL/lib/GraphQL/Language/Receiver.pm ( view source; MetaCPAN )
e 'Pegex::Receiver';
use Types::Standard -all;
use GraphQL::MaybeTypeCheck;
use JSON::MaybeXS;
use Carp;

my $JSON = JSON::MaybeXS->new->allow_nonref->canonical;

my @KINDHASH = qw(
  scalar
  union
 
_boolean (Any $param = undef) {
  return unless defined $param;
  return $param eq 'true' ? JSON->true : JSON->false;
}

method got_null (Any $param = undef) {
  return unless defined $param;
  return
GraphQL ( E/ET/ETJ/GraphQL-0.54.tar.gz, ETJ, 2022; MetaCPAN )
GraphQL/lib/GraphQL/Type.pm ( view source; MetaCPAN )
 Perl representation and the "GraphQL
representation". A "GraphQL representation" means something
JSON-encodeable: an "object" (in Perl terms, a hash), an array (Perl:
array-reference), string, number
n> be JSON-encoded, not things that I<have been> so encoded: this
means, among other things, do not surround strings in C<">, and for
boolean values, use the mechanism in L<JSON::MaybeXS>: C<JSON->tru
NewsExtractor ( G/GU/GUGOD/NewsExtractor-v0.45.0.tar.gz, GUGOD, 2022; MetaCPAN )
NewsExtractor/dev-bin/try-htmlextract.pl ( view source; MetaCPAN )
use v5.28;
use warnings;
use FindBin;
use lib $FindBin::Bin. "/../lib";

use JSON;
use File::Slurp qw(read_file);
use Encode qw(encode);
use Getopt::Long qw< GetOptions >;
use Mojo::DOM;

use NewsExtr
;
use NewsExtractor::GenericExtractor;

my %opts;
GetOptions(
    \%opts,
    "file=s",
);
my $json = JSON->new->pretty->canonical->utf8->allow_blessed->convert_blessed;

if ($opts{file}) {
    my $ht
jo::DOM->new($html);
    my $x = NewsExtractor::GenericExtractor->new( dom => $dom );

    print $json->encode({
        file => $opts{file},
        extracted => {
            site_name => $x->site_n
NewsExtractor ( G/GU/GUGOD/NewsExtractor-v0.45.0.tar.gz, GUGOD, 2022; MetaCPAN )
NewsExtractor/lib/NewsExtractor/JSONLDExtractor.pm ( view source; MetaCPAN )
sExtractor::JSONLDExtractor;
use Moo;
extends 'NewsExtractor::TXExtractor';

use Mojo::Transaction::HTTP;
use Types::Standard qw( InstanceOf HashRef ArrayRef );
use Mojo::JSON qw(from_json);
use Impor
    my ($self) = @_;
    my $el = $self->dom->at('script[type="application/ld+json"]') or return {};
    my $x = from_json( $el->text );
    if (HashRef->check($x)) {
        return $x;
    }
    if (
Image-Randim ( S/SE/SEATEK/Image-Randim-0.09.tar.gz, SEATEK, 2022; MetaCPAN )
Image-Randim/lib/Image/Randim/Source/Unsplash.pm ( view source; MetaCPAN )
package Image::Randim::Source::Unsplash;
our $VERSION = '0.01';
use v5.20;
use warnings;
use JSON;
use Moose;

has 'name' => ( is  => 'ro',
		isa => 'Str',
		default => 'Unsplash',
    );
has 'api_url
    return $self->api_url.$self->api_key;
}

sub get_image {
    my $self = shift;
    my $data = JSON->new->decode($self->get_response);
    
    my $image = Image::Randim::Image->new(
	url    => $$d
Image-Randim ( S/SE/SEATEK/Image-Randim-0.09.tar.gz, SEATEK, 2022; MetaCPAN )
Image-Randim/lib/Image/Randim/Source/Role.pm ( view source; MetaCPAN )
  with 'Image::Randim::Source::Role';

  sub get_image {
      my $self = shift;
      my $data = JSON->new->decode($self->get_response);
      $data = $$data{'response'};

      my $image = Image::Ra
on the provider's site to get the random image's
data.

This is typically a API call that returns JSON.

=head2 C<get_image>

Plugins must return an Image::Randim::Image object, which is populated
wit


In the SYNOPSIS example, you see that JSON is returned from the
get_response() call to the provider's API (which uses the provided
url()) -- and then that JSON is parsed into a hash that is used to 
API-MailboxOrg ( P/PE/PERLSRVDE/API-MailboxOrg-1.0.2.tar.gz, PERLSRVDE, 2022; MetaCPAN )
API-MailboxOrg/lib/API/MailboxOrg/Types.pm ( view source; MetaCPAN )
w( HashRefRestricted Boolean );

use Type::Utils -all;
use Types::Standard -types;

use Carp;
use JSON::PP;
use Scalar::Util qw(blessed);

our $VERSION = '1.0.2'; # VERSION

my $meta = __PACKAGE__->me
stanceOf['JSON::PP::Boolean'],
    constraint_generator => sub {
        return $meta->get_type('Boolean') if !@_;

        return sub {
            return if ! ( blessed $_ and $_->isa('JSON::PP::Boo
ion;
    },
);

coerce Boolean,
    from Bool,
        via {
            my $new = $_ ? $JSON::PP::true : $JSON::PP::false;
            $new;
        }
;

__PACKAGE__->meta->make_immutable;

1;

__END
API-MailboxOrg ( P/PE/PERLSRVDE/API-MailboxOrg-1.0.2.tar.gz, PERLSRVDE, 2022; MetaCPAN )
API-MailboxOrg/lib/API/MailboxOrg/APIBase.pm ( view source; MetaCPAN )
 );
has json_rpc => ( is => 'ro', isa => Str, default => sub { '2.0' } );

state $request_id = 1;

sub _request ( $self, $method, $params = {}, $opts = {} ) {
    my $rpc_data = {
        jsonrpc => $
lt;

        $api->_set_token( $token );
    }

    my %header = ( 'Content-Type' => 'application/json' );
    $header{'HPLS-AUTH'} = $api->token if $api->token;

    my $uri = join '/',
        $api-
eader,
        json => $rpc_data,
    );

    my $response = $tx->res;

    if ( $tx->error ) {
        carp $tx->error->{message};
        return;
    }

    my $data = $response->json;

    if ( $da
JSON-Schema-ToJSON ( L/LE/LEEJO/JSON-Schema-ToJSON-0.20.tar.gz, LEEJO, 2022; MetaCPAN )
JSON-Schema-ToJSON/emulators/generic.pl ( view source; MetaCPAN )

use Mojolicious::Lite; # "strict", "warnings", "utf8" and Perl 5.10 features
use JSON::Schema::ToJSON;
use Mojo::JSON;

my $spec_uri    = shift || die "Need a spec URI: $0 <spec_uri> <base_path> [<ex
a = $spec->{'responses'}{$response}{schema};
				$data = JSON::Schema::ToJSON->new(
					example_key => 'x-example',
				)->json_schema_to_json( schema => $schema );
				$c->stash( status => $response
 );
			}
		}

		$data->{messages} = delete $data->{errors} if $data->{errors};
		return Mojo::JSON::encode_json( $data );
	},
};

app->start;

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