Group
Extension

Matches 35358

Devel-hdb ( B/BR/BRUMMETT/Devel-hdb-0.25.tar.gz, BRUMMETT, 2018; MetaCPAN )
Devel-hdb/lib/Devel/hdb/Client.pm ( view source; MetaCPAN )
package Devel::hdb::Client;

use strict;
use warnings;

use LWP::UserAgent;
use JSON;
use Carp;
use Data::Dumper;
use URI::Escape qw();
use Data::Transform::ExplicitMetadata '0.02';
use Scalar::Util q
Exception::Error' => {
            isa => 'Devel::hdb::Client::Exception',
        },
);

my $JSON ||= JSON->new->utf8->allow_nonref();

sub new {
    my $class = shift;
    my %params = @_;

    my %
 $self->_GET($url);
    _assert_success($response, q(Can't get stack position));
    my $stack = $JSON->decode($response->content);
    foreach my $frame ( @$stack ) {
        $frame->{args} = _decode
Bencher-Scenario-DataCmp ( P/PE/PERLANCAR/Bencher-Scenario-DataCmp-0.001.tar.gz, PERLANCAR, 2018; MetaCPAN )
Bencher-Scenario-DataCmp/lib/Bencher/ScenarioR/DataCmp.pm ( view source; MetaCPAN )
       dataset     => "1k array of ints",
        errors      => 6.3e-06,
        participant => "JSON::PP",
        rate        => 330,
        samples     => 20,
        time        => 3,
        vs
   {
        dataset     => "small arrays",
        errors      => 4e-08,
        participant => "JSON::PP",
        rate        => 36000,
        samples     => 20,
        time        => 0.028,
    
 {
        dataset     => "empty arrays",
        errors      => 3.3e-09,
        participant => "JSON::PP",
        rate        => 128000,
        samples     => 20,
        time        => 0.00782,
 
Mojolicious-Plugin-ReCAPTCHAv2Async ( C/CO/COFFEE/Mojolicious-Plugin-ReCAPTCHAv2Async-0.001.tar.gz, COFFEE, 2018; MetaCPAN )
Mojolicious-Plugin-ReCAPTCHAv2Async/lib/Mojolicious/Plugin/ReCAPTCHAv2Async.pm ( view source; MetaCPAN )

      }

      my $res = $tx->res;
      my $json = eval { $res->json };
      
      if (not defined $json) {
        $c->app->log->error( 'Decoding JSON response failed: ' . $@ );
        $c->app->
rn $p->reject( 'x-unparseable-data-received' );
      }

      if (not $json->{'success'}) {
        return $p->reject( @{ $json->{'error-codes'} // [] } );
      }

      return $p->resolve;

    });
Bencher-Scenario-DataCmp ( P/PE/PERLANCAR/Bencher-Scenario-DataCmp-0.001.tar.gz, PERLANCAR, 2018; MetaCPAN )
Bencher-Scenario-DataCmp/lib/Bencher/Scenario/DataCmp.pm ( view source; MetaCPAN )
ta2>)',
        },
        {
            module => 'JSON::PP',
            code_template => 'JSON::PP::encode_json(<data1>) eq JSON::PP::encode_json(<data2>)',
        },
        {
            fcall_t
 benchmark.

L<Data::Cmp> 0.006

L<Data::Cmp::Numeric> 0.006

L<Data::Cmp::StrOrNumeric> 0.006

L<JSON::PP> 2.27400_02

L<Data::Compare> 1.25

=head1 BENCHMARK PARTICIPANTS

=over

=item * Data::Cmp::
:StrOrNumeric::cmp_data(<data1>, <data2>)



=item * JSON::PP (perl_code)

Code template:

 JSON::PP::encode_json(<data1>) eq JSON::PP::encode_json(<data2>)



=item * Data::Compare::Compare (perl_cod
WebService-PagerDuty ( L/LE/LEV/WebService-PagerDuty-0.1.tar.gz, CUB, 2018; MetaCPAN )
WebService-PagerDuty/lib/WebService/PagerDuty/Request.pm ( view source; MetaCPAN )
warnings;

use base qw/ WebService::PagerDuty::Base /;
use HTTP::Request;
use LWP::UserAgent;
use JSON;
use URI;
use URI::QueryParam;
use WebService::PagerDuty::Response;

__PACKAGE__->mk_ro_accessors
rams;

    my $headers = HTTP::Headers->new;
    $headers->header( 'Content-Type' => 'application/json' ) if %$body;
    $headers->authorization_basic( $user, $password ) if $user && $password;
    $h
'Authorization' => "Token token=$api_key" ) if $api_key;

    my $content = '';
    $content = to_json($body) if %$body;

    my $request = HTTP::Request->new( $method, $url, $headers, $content );

  
POE-Component-Hailo ( H/HI/HINRIK/POE-Component-Hailo-0.11.tar.gz, HINRIK, 2018; MetaCPAN )
POE-Component-Hailo/lib/POE/Component/Hailo.pm ( view source; MetaCPAN )
use 5.010;
use strict;
use warnings;
use Carp 'croak';
use Hailo;
use JSON;
use LWP::UserAgent;
use POE qw(Wheel::Run Filter::JSON);
use Try::Tiny;

sub spawn {
    my ($package, %args) = @_;

    cro
t => '_child_stdout',
        StderrEvent => '_child_stderr',
        StdioFilter => POE::Filter::JSON->new,
        ( $^O eq 'MSWin32' ? ( CloseOnCall => 0 ) : ( CloseOnCall => 1 ) ),
    );

    $ke
N;
        binmode STDOUT;
    }

    my $raw;
    my $size = 4096;
    my $filter = POE::Filter::JSON->new;

    while (sysread STDIN, $raw, $size) {
        my $requests = $filter->get([$raw]);
    
WebService-PagerDuty ( L/LE/LEV/WebService-PagerDuty-0.1.tar.gz, LEV, 2018; MetaCPAN )
WebService-PagerDuty/lib/WebService/PagerDuty.pm ( view source; MetaCPAN )
$self->header->{Accept} =
        "application/vnd.pagerduty+json;version=" . $self->api_version;
    $self->content_type('application/json');
    $self->base_url('https://api.pagerduty.com');
    $se
Outthentic-DSL ( M/ME/MELEZHIK/Outthentic-DSL-0.2.10.tar.gz, MELEZHIK, 2018; MetaCPAN )
Outthentic-DSL/lib/Outthentic/DSL.pm ( view source; MetaCPAN )
SL::Context::Default;
use Outthentic::DSL::Context::TextBlock;
use File::Temp qw/ tempfile /;
use JSON;

$Data::Dumper::Terse=1;

sub results {

    my $self = shift;

    $self->{results};
}

sub add
 shift;
    $self->{captures} = [];
    unlink $self->{cache_dir}."/captures.json" if -f $self->{cache_dir}."/captures.json";
}

sub reset_succeeded {

    my $self = shift;
    $self->{succeeded} = [
ES, '>', $self->{cache_dir}.'/captures.json' 
        or confess "can't open ".($self->{cache_dir})."captures.json to write $!";
      print CAPTURES encode_json($self->{captures});
      $self->debug
WebService-PagerDuty ( L/LE/LEV/WebService-PagerDuty-0.1.tar.gz, CUB, 2018; MetaCPAN )
WebService-PagerDuty/lib/WebService/PagerDuty/Response.pm ( view source; MetaCPAN )
1627';
}
## use critic
use strict;
use warnings;

use base qw/ WebService::PagerDuty::Base /;
use JSON;
use Error qw/ :try /;

my @all_options = qw/
  code status message error
  incident_key
  total 
essage();
        $options->{errors}  = undef;

        try {
            $options->{data} = from_json( $response->content() ) if $response->content();
        }
        otherwise {
            my $er
that could happen and we care of - it's when $response->content can't
            ## be parsed as json (no difference why - because of bad request or something else)
            $options->{data} = {
 
Net-Azure-CognitiveServices-Face ( Y/YT/YTURTLE/Net-Azure-CognitiveServices-Face-0.04.tar.gz, YTURTLE, 2018; MetaCPAN )
Net-Azure-CognitiveServices-Face/lib/Net/Azure/CognitiveServices/Face/Base.pm ( view source; MetaCPAN )
package Net::Azure::CognitiveServices::Face::Base;
use strict;
use warnings;
use HTTP::Tiny;
use JSON;
use Carp;
use URI;

sub new {
    my ($class, %opts) = @_;
    return bless {%opts}, $class;
}

s
        $uri->query_form(%query);
    }
    $uri;
}

sub json {
    my $self = shift;
    $self->{json} ||= JSON->new->utf8(1);
    $self->{json};
}

sub agent {
    my $self = shift;
    $self->{agen
content-type'};
        if ($content_type !~ /application\/json/) {
            croak($res->{content}); 
        }
        $body = $self->json->decode($res->{content});
    }
    if (!$res->{success})
SockJS ( V/VT/VTI/SockJS-0.10.tar.gz, VTI, 2018; MetaCPAN )
SockJS/lib/SockJS.pm ( view source; MetaCPAN )
gs;

our $VERSION = '0.10';

use overload '&{}' => sub { shift->to_app(@_) }, fallback => 1;

use JSON         ();
use Digest::MD5  ();
use Scalar::Util ();

use Plack::Middleware::Chunked;
use SockJS
fo = JSON::encode_json(
        {
              websocket => $self->{websocket} ? JSON::true
            : JSON::false,
            cookie_needed => $self->{cookie} ? JSON::true
            : JSON::fa
        }
    );

    return [
        200,
        [
            'Content-Type'  => 'application/json; charset=UTF-8',
            'Content-Length' => length($info),
        ],
        [$info]
    ];
Net-APNs-HTTP2 ( X/XA/XAICRON/Net-APNs-HTTP2-0.02.tar.gz, XAICRON, 2018; MetaCPAN )
Net-APNs-HTTP2/lib/Net/APNs/HTTP2.pm ( view source; MetaCPAN )
ct;
use warnings;

our $VERSION = "0.02";

use Moo;
use Crypt::PK::ECC 0.059;
use Crypt::JWT;
use JSON;
use Cache::Memory::Simple;

use AnyEvent;
use AnyEvent::Handle;
use AnyEvent::Socket;
use Protoc
collapse_id ? ('apns-collapse-id' => $apns_collapse_id) : (),
        ],
        data    => JSON::encode_json($payload),
        on_done => $cb,
    );

    return $self;
}

sub send {
    my $self = 
metabase-relayd ( B/BI/BINGOS/metabase-relayd-0.42.tar.gz, BINGOS, 2018; MetaCPAN )
metabase-relayd/lib/App/Metabase/Relayd.pm ( view source; MetaCPAN )
if $version;

  $config{idfile} = File::Spec->catfile( _metabase_dir(), '.metabase', 'metabase_id.json' ) unless $config{idfile};
  $config{dbfile} = File::Spec->catfile( _metabase_dir(), '.metabase',
CloudHealth-API ( J/JL/JLMARTIN/CloudHealth-API-0.01.tar.gz, JLMARTIN, 2018; MetaCPAN )
CloudHealth-API/lib/CloudHealth/API.pm ( view source; MetaCPAN )
ibute
of the constructor

=head1 RESULTS

Results are returned as a Perl HashRef representing the JSON returned by the API.

=head1 SEE ALSO

L<https://apidocs.cloudhealthtech.com/>

There is a CLI wr
SockJS ( V/VT/VTI/SockJS-0.10.tar.gz, VTI, 2018; MetaCPAN )
SockJS/lib/SockJS/Session.pm ( view source; MetaCPAN )
package SockJS::Session;

use strict;
use warnings;

use JSON ();
use Encode ();

sub new {
    my $class = shift;
    my (%params) = @_;

    my $self = {};
    bless $self, $class;

    $self->{id} 
encode('UTF-8', $message) if Encode::is_utf8($message);
    }
    else {
        $message = 'a' . JSON->new->ascii(1)->encode([@_]) if @_;
    }

    return $self->{conn}->write($message);
}

sub clos
QBit-Validator ( M/MA/MADSKILL/QBit-Validator-0.012.tar.gz, MADSKILL, 2018; MetaCPAN )
QBit-Validator/lib/QBit/Validator/PathManager.pm ( view source; MetaCPAN )
Your path manager

You can write path manager for your favoriet data manager (Data::DPath, JSON::Pointer, JSON::Path, etc)

B<Example:>

  package QBit::Validator::PathManager::Data::DPath;

  use bas
Amazon-EC2 ( B/BI/BIGFOOT/Amazon-EC2-1.0.1.tar.gz, BIGFOOT, 2018; MetaCPAN )
Amazon-EC2/lib/Amazon/EC2.pm ( view source; MetaCPAN )
;

use strict;
use warnings;

use parent qw/Amazon::API/;

use Amazon::Credentials;
use JSON qw/from_json to_json/;
use Scalar::Util qw/reftype/;
use XML::Simple;
use Data::Dumper;

=pod

=head1 NAME
 => 'i-0b91d8e165cf2f41b'}]);
 my $result = $ec2->DescribeInstances(Filter => $filter);
 print to_json($result, { pretty  => 1 });

=cut

sub DescribeInstances {
  my $self = shift;
  my %args = @_;
 
WWW-FCM-HTTP ( X/XA/XAICRON/WWW-FCM-HTTP-0.03.tar.gz, XAICRON, 2018; MetaCPAN )
WWW-FCM-HTTP/lib/WWW/FCM/HTTP.pm ( view source; MetaCPAN )
se LWP::Protocol::https;
use LWP::ConnCache;
use JSON qw(encode_json);
use Class::Accessor::Lite (
    new => 0,
    rw  => [qw/ua api_url api_key json/],
);
use Carp qw(croak);

use WWW::FCM::HTTP::R
> 'key='.$self->api_key);
    $req->header('Content-Type' => 'application/json; charset=UTF-8');
    $req->content(encode_json $payload);

    return $req;
}

1;
__END__

=encoding utf-8

=head1 NAME
head1 SYNOPSIS

    use WWW::FCM::HTTP;

    my $api_key = 'Your API key'; # from google-services.json
    my $fcm     = WWW::FCM::HTTP->new({ api_key => $api_key });

    # send multicast request
   
CloudHealth-API ( J/JL/JLMARTIN/CloudHealth-API-0.01.tar.gz, JLMARTIN, 2018; MetaCPAN )
CloudHealth-API/lib/CloudHealth/API/ResultParser.pm ( view source; MetaCPAN )
ge CloudHealth::API::ResultParser;
  use Moo;
  use JSON::MaybeXS;
  use CloudHealth::API::Error;

  has parser => (is => 'ro', default => sub { JSON::MaybeXS->new });

  sub result2return {
    my ($
oudHealth::API::Error->throw(
      type => 'UnparseableResponse',
      message => 'Can\'t parse JSON content',
      detail => $response->content,
    ) if ($@);

    my $message;
    if (defined $s
CloudHealth-API ( J/JL/JLMARTIN/CloudHealth-API-0.01.tar.gz, JLMARTIN, 2018; MetaCPAN )
CloudHealth-API/lib/CloudHealth/API/Call/AssetsForSpecificCustomer.pm ( view source; MetaCPAN )
_api_id' },  
    { name => 'api_version' },  
    { name => 'name' },  
  ] }
  sub _url_params { [ ] }
  sub _method { 'GET' }
  sub _url { 'https://chapi.cloudhealthtech.com/api/search.json' }

1;

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