Group
Extension

Matches 35358

Bencher-Scenarios-JSONDecodeRegexp ( P/PE/PERLANCAR/Bencher-Scenarios-JSONDecodeRegexp-0.003.tar.gz, PERLANCAR, 2017; MetaCPAN )
Bencher-Scenarios-JSONDecodeRegexp/lib/Bencher/Scenarios/JSONDecodeRegexp.pm ( view source; MetaCPAN )
er::Scenarios::JSONDecodeRegexp;

our $DATE = '2017-01-25'; # DATE
our $VERSION = '0.003'; # VERSION

use 5.010001;
use strict;
use warnings;

1;
# ABSTRACT: Scenarios to benchmark JSON::Decode::Regex
1 NAME

Bencher::Scenarios::JSONDecodeRegexp - Scenarios to benchmark JSON::Decode::Regexp

=head1 VERSION

This document describes version 0.003 of Bencher::Scenarios::JSONDecodeRegexp (from Perl dis
er-Scenarios-JSONDecodeRegexp), released on 2017-01-25.

=head1 DESCRIPTION

This distribution contains the following L<Bencher> scenario modules:

=over

=item * L<Bencher::Scenario::JSONDecodeRegexp
Bencher-Scenarios-JSONDecodeRegexp ( P/PE/PERLANCAR/Bencher-Scenarios-JSONDecodeRegexp-0.003.tar.gz, PERLANCAR, 2017; MetaCPAN )
Bencher-Scenarios-JSONDecodeRegexp/lib/Bencher/Scenario/JSONDecodeRegexp/Startup.pm ( view source; MetaCPAN )
package Bencher::Scenario::JSONDecodeRegexp::Startup;

our $DATE = '2017-01-25'; # DATE
our $VERSION = '0.003'; # VERSION

use 5.010001;
use strict;
use warnings;

our $scenario = {
    summary => 'Be
nchmark startup overhead of JSON::Decode::Regexp vs some other modules',
    module_startup => 1,
    participants => [
        {module=>'JSON::Decode::Regexp'},

        {module=>'Regexp::Grammars'},
up overhead of JSON::Decode::Regexp vs some other modules

__END__

=pod

=encoding UTF-8

=head1 NAME

Bencher::Scenario::JSONDecodeRegexp::Startup - Benchmark startup overhead of JSON::Decode::Regex
Bencher-Scenarios-JSONDecodeRegexp ( P/PE/PERLANCAR/Bencher-Scenarios-JSONDecodeRegexp-0.003.tar.gz, PERLANCAR, 2017; MetaCPAN )
Bencher-Scenarios-JSONDecodeRegexp/lib/Bencher/ScenarioR/JSONDecodeRegexp.pm ( view source; MetaCPAN )
R::JSONDecodeRegexp;

our $VERSION = 0.003; # VERSION

our $results = [
  [
    200,
    "OK",
    [
      {
        errors      => 1.9e-07,
        modver      => 0.06,
        participant => "JSON::
Decode::Regexp::from_json",
        rate        => 11000,
        samples     => 24,
        time        => 87,
        vs_slowest  => 1,
      },
      {
        errors      => 1.9e-07,
        modve
r      => 0.03,
        participant => "JSON::Decode::Regexp::from_json",
        rate        => 17000,
        samples     => 20,
        time        => 60,
        vs_slowest  => 1.4,
      },
     
OpenSourceOrg-API ( P/PA/PABLROD/OpenSourceOrg-API-0.001.tar.gz, PABLROD, 2017; MetaCPAN )
OpenSourceOrg-API/lib/OpenSourceOrg/API.pm ( view source; MetaCPAN )
STRACT: Perl API Bindings to the OSI License API

use Moo;
use REST::Client;
use Const::Fast;
use JSON;
use Carp;

const my $base_url => 'https://api.opensource.org';

has _api_client => ( is => 'lazy
();
    my $response = shift();
    if ( $response->responseCode() == 200 ) {
        return from_json( $response->responseContent );
    } else {
        croak 'Error: ' . $response->responseCode() .
THODS

=head2 all

Get a list of all known licenses. 

The response is the perl equivalent of the json returned by the api,
documented in L<https://github.com/OpenSourceOrg/api/blob/master/doc/endpoin
Bencher-Scenarios-JSONDecodeRegexp ( P/PE/PERLANCAR/Bencher-Scenarios-JSONDecodeRegexp-0.003.tar.gz, PERLANCAR, 2017; MetaCPAN )
Bencher-Scenarios-JSONDecodeRegexp/lib/Bencher/Scenario/JSONDecodeRegexp.pm ( view source; MetaCPAN )
::Scenario::JSONDecodeRegexp;

our $DATE = '2017-01-25'; # DATE
our $VERSION = '0.003'; # VERSION

use 5.010001;
use strict;
use warnings;

our $scenario = {
    summary => 'Benchmark JSON decoding',
mplate => 'JSON::Decode::Regexp::from_json(<data>)',
        },
        {
            module => 'JSON::PP',
            function => 'decode',
            code_template => 'state $json = JSON::PP->new-
>allow_nonref; $json->decode(<data>)',
        },
    ],
    datasets => [
        {name => 'str-a'   , args=>{data=>'"123456789012345678901234567890123456789012345678901234567890123456789012345678901
Swagger2 ( A/AS/ASHIMEMA/Swagger2-0.89.tar.gz, ASHIMEMA, 2017; MetaCPAN )
Swagger2/lib/Swagger2/SchemaValidator.pm ( view source; MetaCPAN )
package Swagger2::SchemaValidator;
use Mojo::Base 'JSON::Validator::OpenAPI';
warn "# Swagger2::SchemaValidator is deprecated in favor of JSON::Validator::OpenAPI";
1;

=encoding utf8

=head1 NAME

Sw
Validator - DEPRECATED

=head1 DEPRECATION WARNING

See L<Swagger2>.

=head1 DESCRIPTION

Use L<JSON::Validator::OpenAPI> instead.

=head1 SEE ALSO

L<Swagger2> and L<JSON::Validator::OpenAPI>.

=cut
API-Intis ( N/NN/NNMOS/API-Intis-1.00.tar.gz, NNMOS, 2017; MetaCPAN )
API-Intis/API/Intis/lib/API/Intis.pm ( view source; MetaCPAN )
Grab;
use YAML::Tiny;
use WWW::Mechanize;
use Crypt::SSLeay;
use Digest::Perl::MD5 'md5_hex';
use JSON;
use error_codes;


sub readConfig {
    my $conf = YAML::Tiny->read( 'config.yaml' );
    return
} else {
        %config = (%config, %timestamp);
    };
    my @o_formats = ('xml', 'json');
    my $request_json; my $request_xml;
    foreach my $format (@o_formats) {
        $config{return} = $fo
f-8', raw => 1);
        $request_json = $request if $format eq 'json';
        $request_xml = $request if $format eq 'xml';
    };
    my $r = from_json($request_json);
    my @error;
    if ($r->{er
Swagger2 ( A/AS/ASHIMEMA/Swagger2-0.89.tar.gz, ASHIMEMA, 2017; MetaCPAN )
Swagger2/lib/Swagger2/Client.pm ( view source; MetaCPAN )
package Swagger2::Client;
use Mojo::Base -base;

use Mojo::JSON;
use Mojo::UserAgent;
use Mojo::Util;
use Carp ();
use Swagger2;
use JSON::Validator::OpenAPI;

use constant DEBUG => $ENV{SWAGGER2_DEBU
t->_swagger->base_url) };
has ua         => sub { Mojo::UserAgent->new };
has _validator => sub { JSON::Validator::OpenAPI->new; };

sub generate {
  my $class = shift;
  my ($swagger, $url) = _swagge
es = Mojo::Message::Response->new;
  $res->headers->content_type('application/json');
  $res->body(Mojo::JSON::encode_json({errors => $_[0]}));
  $res->code(400)->message($res->default_message);
  $re
Swagger2 ( A/AS/ASHIMEMA/Swagger2-0.89.tar.gz, ASHIMEMA, 2017; MetaCPAN )
Swagger2/lib/Swagger2.pm ( view source; MetaCPAN )
se Mojo::Base -base;
use Mojo::Asset::File;
use Mojo::JSON;
use Mojo::JSON::Pointer;
use Mojo::URL;
use File::Basename ();
use File::Spec;
use JSON::Validator::OpenAPI;

our $VERSION = '0.89';

# Shou
 = shift;
  return $self->_validator->_load_schema($self->url) if '' . $self->url;
  return Mojo::JSON::Pointer->new({});
};

has base_url => sub {
  my $self = shift;
  my $url  = Mojo::URL->new;
  m
pecification => sub { shift->_validator->schema('http://swagger.io/v2/schema.json')->schema };

has _validator => sub { JSON::Validator::OpenAPI->new };

sub ua  { shift->_validator->ua(@_) }
sub url 
QBit-Application-Model-DBManager-Users ( M/MA/MADSKILL/QBit-Application-Model-DBManager-Users-0.007.tar.gz, MADSKILL, 2017; MetaCPAN )
QBit-Application-Model-DBManager-Users/lib/QBit/Application/Model/DBManager/Users.pm ( view source; MetaCPAN )
a_fields = $self->db->users_extra_fields->get_all(
            fields => [qw(user_id key value is_json)],
            filter => {user_id => array_uniq(map {$_->{'id'}} @$result)}
        );

        f
ields->{'__EXTRA_FIELDS__'}{$rec->{'user_id'}}{$rec->{'key'}}},
                $rec->{'is_json'} ? from_json($rec->{'value'}) : $rec->{'value'}
            );
        }
    }
}

sub add {
    my ($se
ta,
                        map {{user_id => $id, key => $key, value => $_->{'value'}, is_json => $_->{'is_json'}}}
                          @{$extra_fields->{$key}});
                }

            
Catalyst-TraitFor-Model-DBIC-Schema-Result ( J/JJ/JJNAPIORK/Catalyst-TraitFor-Model-DBIC-Schema-Result-0.006.tar.gz, JJNAPIORK, 2017; MetaCPAN )
Catalyst-TraitFor-Model-DBIC-Schema-Result/lib/Catalyst/TraitFor/Model/DBIC/Schema/Result.pm ( view source; MetaCPAN )
if($c->debug) {
          require JSON::MaybeXS;
          my $json_with_args = JSON::MaybeXS->new(utf8 => 1, allow_nonref=>1);
          $find = scalar(@find) ? $json_with_args->encode(@find) : '[NEW
Swagger2 ( A/AS/ASHIMEMA/Swagger2-0.89.tar.gz, ASHIMEMA, 2017; MetaCPAN )
Swagger2/lib/Swagger2/Editor.pm ( view source; MetaCPAN )
   initializing = false;
    ace.session.setMode("ace/mode/" + (ace.getValue().match(/^\s*\{/) ? "json" : "yaml"));
    preview.scrollTop = scrollSave();
  };

  var render = function() {
    scrollSa
Editor> is a WEB based Swagger2 API editor.

=head1 SYNOPSIS

  $ mojo swagger2 edit /path/to/api.json --listen http://*:3000

=head1 ATTRIBUTES

=head2 specification_file

Returns path to swagger spe
 render the POD if requested as C</.txt> instead.

=head2 POST /

Will L<parse|Swagger/parse> the JSON/YAML in the HTTP body and render it as POD.

=head1 METHODS

=head2 startup

Used to set up the L
Ticketmaster-API ( T/TA/TANK/Ticketmaster-API-0.02.tar.gz, TANK, 2017; MetaCPAN )
Ticketmaster-API/lib/Ticketmaster/API/Discovery.pm ( view source; MetaCPAN )
 my $args = {@_};

    return $self->get_data(method => 'GET', path_template => "$base_uri/events.json", parameters => $args);
}

=head2 event_details

Returns the event details by event ID.

Also See
provided\n");

    return $self->get_data(method => 'GET', path_template => "$base_uri/events/$id.json", parameters => $args);
}

=head2 event_images

Returns all event images by event ID.

Also See: 
d\n");

    return $self->get_data(method => 'GET', path_template => "$base_uri/events/$id/images.json", parameters => $args);
}

=head2 search_attractions

Returns available attactions

Also See: htt
Ticketmaster-API ( T/TA/TANK/Ticketmaster-API-0.02.tar.gz, TANK, 2017; MetaCPAN )
Ticketmaster-API/lib/Ticketmaster/API.pm ( view source; MetaCPAN )
package Ticketmaster::API;

use 5.006;
use strict;
use warnings;

use Carp;
use JSON::XS;
use LWP::UserAgent;

=head1 NAME

Ticketmaster::API - start interacting with Ticketmaster's APIs

=head1 VERSI
d => $uri);

    my $res = $ua->request($req);

    if ($res->is_success) {
        return decode_json($res->content);
    }
    else {
        Carp::croak("Error: " . $res->status_line);
    }
}

=he
XAS ( K/KE/KESTEB/XAS-0.15.tar.gz, KESTEB, 2017; MetaCPAN )
XAS/lib/XAS/Lib/Modules/Alerts.pm ( view source; MetaCPAN )
ion    => $VERSION,
  base       => 'XAS::Singleton',
  accessors  => 'spooler',
  codec      => 'JSON',
  utils      => ':validation',
  filesystem => 'Dir'
;

# -------------------------------------
y => $self->env->facility,
        message  => $message,
    };

    my $json = encode($data);

    $self->spooler->write($json);

}

# ----------------------------------------------------------------
Mojolicious-Plugin-Mongol ( M/MA/MARGHI/Mojolicious-Plugin-Mongol-1.0.tar.gz, MARGHI, 2017; MetaCPAN )
Mojolicious-Plugin-Mongol/lib/Mojolicious/Plugin/Mongol.pm ( view source; MetaCPAN )
b action {
		my $self = shift();

		my $mongo = $self->mongodb();

		...

		return $self->render( json => undef );
	}

Just in case you need access to the MongoDB client instance you can use this help
XAS ( K/KE/KESTEB/XAS-0.15.tar.gz, KESTEB, 2017; MetaCPAN )
XAS/lib/XAS/Constants.pm ( view source; MetaCPAN )
ants
  constant => {

      # generic

      LF => "\012",
      CR => "\015",

      # JSON RPC

      RPC_JSON            => '2.0',
      RPC_DEFAULT_ADDRESS => '127.0.0.1',
      RPC_DEFAULT_PORT  
     LOG_LEVELS   => qr/info|warn|error|fatal|debug|trace/,
      LOG_TYPES    => qr/console|file|json|syslog/,
      LOG_FACILITY => qr/auth|authpriv|cron|daemon|ftp|local[0-7]|lpr|mail|news|user|uuc
    LOCK_DRIVERS => qr(Flom|Filesystem|Nolock|KeyedMutex),

  },
  exports => {
      all => 'RPC_JSON RPC_DEFAULT_PORT RPC_DEFAULT_ADDRESS RPC_ERR_PARSE 
              RPC_ERR_REQ RPC_ERR_METHOD RPC_
WWW-Deezer ( K/KA/KABANOID/WWW-Deezer-0.03.tar.gz, KABANOID, 2017; MetaCPAN )
WWW-Deezer/lib/WWW/Deezer.pm ( view source; MetaCPAN )
package WWW::Deezer;

use strict;
use warnings;

use Carp();
use LWP::UserAgent;
use JSON;
use URI::Escape;

use WWW::Deezer::SearchResult;
use WWW::Deezer::Artist;

our $VERSION = '0.03';
our $API_VE
rl => "http://api.deezer.com/$API_VERSION/",
        ua      => LWP::UserAgent->new,
        json    => JSON->new->allow_nonref,
        debug   => 0,
    };

    $self->{ua}->agent("WWW::Deezer v".$V
_get_url ({
        url     => $uri.'/'.$id,
        method  => 'GET'
    });

    $res = $self->{json}->decode ($res) unless _is_hashref ($res);
    $res->{deezer_obj} = $self;

    return WWW::Deeze
App-OnePif ( P/PO/POLETTIX/App-OnePif-0.002.tar.gz, POLETTIX, 2017; MetaCPAN )
App-OnePif/lib/App/OnePif.pm ( view source; MetaCPAN )
redefine';
   my @booleans = (
      'JSON::PP::Boolean',
      'JSON::XS::Boolean',
      'Types::Serialiser::Boolean',  # should not be needed
      'Mojo::JSON::_Bool',           # only up to Mojol
icious 6.21
      # Dancer, Dancer2 use JSON
   );
   sub YAML::Tiny::dumper_for_unknown {
      my ($self, $element, $line, $indent, $seen) = @_;
      my $type = ref $element;

      for my $boolean
 1,
   default => \&DEFAULT_records,
);

has JSON_decoder => (
   is      => 'rw',
   lazy    => 1,
   default => sub {
      for my $module (qw< JSON JSON::PP >) {
         (my $filename = "$module.p
WWW-Deezer ( K/KA/KABANOID/WWW-Deezer-0.03.tar.gz, KABANOID, 2017; MetaCPAN )
WWW-Deezer/lib/WWW/Deezer/Artist.pm ( view source; MetaCPAN )
a => 'Int';
has 'nb_fan', is => 'rw', isa => 'Int';

has 'radio' => (
    is => 'ro',
    isa => 'JSONBoolean',
    coerce => 1
);

around BUILDARGS => sub { # allow create Artist object with single a
      $self = WWW::Deezer->new->artist($_[0]);
    }
    else {
        # 2DO: deal with Bool and JSON::XS::Boolean=\1 in 'radio' argument
        $self = $class->$orig(@_);
    }
    return $self;
};

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