Group
Extension

Matches 35359

Net-PMP-Profile ( K/KA/KARMAN/Net-PMP-Profile-0.102.tar.gz, KARMAN, 2017; MetaCPAN )
Net-PMP-Profile/lib/Net/PMP/Profile.pm ( view source; MetaCPAN )
package Net::PMP::Profile;
use Moose;
use Data::Dump qw( dump );
use Data::Clean::JSON;
use Net::PMP::Profile::TypeConstraints;
use Net::PMP::CollectionDoc;
use Net::PMP::CollectionDoc::Link;

our $VE
les/base'}
sub get_profile_title { ref(shift) }

# singleton for class
my $cleaner = Data::Clean::JSON->new(
    DateTime                              => [ call_method => 'stringify' ],
    'Net::PMP:
DR-TarantoolQueue ( U/UN/UNERA/DR-TarantoolQueue-0.44.tar.gz, UNERA, 2017; MetaCPAN )
DR-TarantoolQueue/lib/DR/TarantoolQueue.pm ( view source; MetaCPAN )
package DR::TarantoolQueue;
use utf8;
use strict;
use warnings;
use Mouse;
use Carp;
use JSON::XS;
require DR::TarantoolQueue::Task;
$Carp::Internal{ (__PACKAGE__) }++;

our $VERSION = '0.44';
use fea
Catmandu-RDF ( V/VO/VOJ/Catmandu-RDF-0.32.tar.gz, VOJ, 2017; MetaCPAN )
Catmandu-RDF/lib/Catmandu/RDF.pm ( view source; MetaCPAN )
 Ttl  => 'Turtle',
    N3   => 'Notation3',
    Xml  => 'RDFXML',
    XML  => 'RDFXML',
    Json => 'RDFJSON',
);

has type => (
    is => 'ro',
    coerce => sub { my $t = ucfirst($_[0]); $TYPE_ALIAS
porter::RDF>

Serialize RDF data (as RDF/XML, RDF/JSON, Turtle, NTriples, RDFa...)

=item L<Catmandu::Importer::RDF>

Parse RDF data (RDF/XML, RDF/JSON, Turtle, NTriples...) or import from a SPARQL
en
MooX-Options ( R/RE/REHSACK/MooX-Options-4.103.tar.gz, REHSACK, 2017; MetaCPAN )
MooX-Options/lib/MooX/Options/Role.pm ( view source; MetaCPAN )
 and convert the result for the "new" method.

It is use by "new_with_options".

=cut

my $decode_json;

sub parse_options {
    my ( $class, %params ) = @_;

    my %options_data   = $class->_options
f ( $data{json} ) {
                    defined $decode_json
                        or $decode_json = eval {
                        use_module("JSON::MaybeXS");
                        JSON::MaybeXS
->can("decode_json");
                        };
                    defined $decode_json
                        or $decode_json = eval {
                        use_module("JSON::PP");
             
Catmandu-RDF ( V/VO/VOJ/Catmandu-RDF-0.32.tar.gz, VOJ, 2017; MetaCPAN )
Catmandu-RDF/lib/Catmandu/Exporter/RDF.pm ( view source; MetaCPAN )
e aliases C<ttl> for C<Turtle>, C<n3> for
C<Notation3>, C<xml> and C<XML> for C<RDFXML>, C<json> for C<RDFJSON>.

When the option C<type> is set to 'NTriples' the export can be streamed in all 
other 
AI-XGBoost ( P/PA/PABLROD/AI-XGBoost-0.11.tar.gz, PABLROD, 2017; MetaCPAN )
AI-XGBoost/lib/AI/XGBoost/Booster.pm ( view source; MetaCPAN )
BoosterGetAttrNames( $self->_handle ) } };
}

sub TO_JSON {
    my $self = shift;
    my $trees = XGBoosterDumpModelEx( $self->_handle, "", 1, "json" );
    return "[" . join( ',', @$trees ) . "]";
}
r as a HASHREF

=head2 TO_JSON

Serialize the booster to JSON.

This method is to be used with the option C<convert_blessed> from L<JSON>.
(See L<https://metacpan.org/pod/JSON#OBJECT-SERIALISATION>)

API-Drip-Request ( D/DW/DWRIGHT/API-Drip-Request-0.05.tar.gz, DWRIGHT, 2017; MetaCPAN )
API-Drip-Request/lib/API/Drip/Request.pm ( view source; MetaCPAN )
ec;
use File::HomeDir;
use Readonly;
use Carp;
use LWP::UserAgent;
use HTTP::Request::Common;
use JSON;
use URI;
use Data::Printer;

Readonly our %DEFAULTS => (
    DRIP_TOKEN => undef,
    DRIP_ID   
  if ( ref($content) ) {
        $request->content_type('application/vnd.api+json');
        $request->content( encode_json( $content ) );
    }
    $request->authorization_basic( $self->{DRIP_TOKEN},
   return undef;
    }
    my $decoded = eval {decode_json( $result->content )};
    if ( $@ ) {
        $self->{debugger}->('Failed to decode JSON:', $@, $result->content);
        die $result;
    }
DR-TarantoolQueue ( U/UN/UNERA/DR-TarantoolQueue-0.44.tar.gz, UNERA, 2017; MetaCPAN )
DR-TarantoolQueue/lib/DR/TarantoolQueue/PackUnpack.pm ( view source; MetaCPAN )
ss::Zlib;
use MIME::Base64;

use JSON::XS;
        
has jsp =>
    is      => 'ro',
    isa     => 'Object',
    lazy    => 1,
    builder => sub {
        return JSON::XS
                -> new
     
Catmandu-RDF ( V/VO/VOJ/Catmandu-RDF-0.32.tar.gz, VOJ, 2017; MetaCPAN )
Catmandu-RDF/lib/Catmandu/Importer/RDF.pm ( view source; MetaCPAN )
e RDF::Query;
use RDF::LDF;
use RDF::aREF;
use RDF::aREF::Encoder;
use RDF::NS;
use IO::Pipe;
use JSON;
use LWP::UserAgent::CHICaching;

our $VERSION = '0.32';

with 'Catmandu::RDF';
with 'Catmandu::I
de($pipe,':encoding(UTF-8)');

    return sub {
      state $line = <$pipe>;

      return decode_json($line) if defined($line);

      waitpid($pid,0);

      return undef;
    };
  }
  else {
    # 
is_literal ? $triple->object->literal_datatype : undef;

        # Create the RDF::Trine type RDF/JSON RDF::aREF can parse
        my $hashref = {};

        $hashref->{$subject}->{$predicate}->[0]->{
MooX-Options ( R/RE/REHSACK/MooX-Options-4.103.tar.gz, REHSACK, 2017; MetaCPAN )
MooX-Options/lib/MooX/Options.pm ( view source; MetaCPAN )
IONS_ATTRIBUTES
    = qw/format short repeatable negatable autosplit autorange doc long_doc order json hidden spacer_before spacer_after/;

sub import {
    my ( undef, @import ) = @_;
    my $options
ions{order} = 0 if !defined $options{order};

    if ( $options{json}
        || ( defined $options{format} && $options{format} eq 'json' ) )
    {
        delete $options{repeatable};
        delete 
ange};
        delete $options{negativable};
        delete $options{negatable};
        $options{json}   = 1;
        $options{format} = 's';
    }

    if ( $options{autorange} and not defined $opti
DR-TarantoolQueue ( U/UN/UNERA/DR-TarantoolQueue-0.44.tar.gz, UNERA, 2017; MetaCPAN )
DR-TarantoolQueue/lib/DR/TarantoolQueue/Task.pm ( view source; MetaCPAN )
package DR::TarantoolQueue::Task;
use utf8;
use strict;
use warnings;
use Mouse;
use JSON::XS ();
use Carp;

has space   => (is => 'ro', isa => 'Str', required => 1);
has status  => (
    is          
MooX-Options ( R/RE/REHSACK/MooX-Options-4.103.tar.gz, REHSACK, 2017; MetaCPAN )
MooX-Options/lib/MooX/Options/Descriptive/Usage.pm ( view source; MetaCPAN )
format_doc->{$format} if defined $format;
        $format_doc_str = 'JSON'
            if defined $options_data{ $opt->{name} }{json};

        my $spec
            = ( defined $short ? "-" . $short .
format_doc->{$format} if defined $format;
        $format_doc_str = 'JSON'
            if defined $options_data{ $opt->{name} }{json};
        push @message,
              ( defined $short ? "-" . $sh
{$format}
            if defined $format;
        $format_doc_str = 'JSON'
            if defined $options_data{ $opt->{name} }{json};

        my $opt_long_name
            = "-" . ( length( $opt->{n
MozRepl-RemoteObject ( C/CO/CORION/MozRepl-RemoteObject-0.40.tar.gz, CORION, 2017; MetaCPAN )
MozRepl-RemoteObject/lib/MozRepl/RemoteObject/Methods.pm ( view source; MetaCPAN )
eturn bridge($self)->unjson($js);
}

=head2 C<< $obj->MozRepl::RemoteObject::Methods::transform_arguments(@args) >>

This method transforms the passed in arguments to their JSON string
representations
s a Javascript string.

=cut
 
sub transform_arguments {
    my $self = shift;
    my $json = bridge($self)->json;
    map {
        if (! defined) {
             'null'
        } elsif (/^(?:[1-9][0-
                             id($cb)
        } elsif (ref) {
            $json->encode($_);
        } else {
            $json->encode($_)
        }
    } @_
};

# Helper to centralize the reblessing
MediaCloud-JobManager ( L/LV/LVALIUKAS/MediaCloud-JobManager-0.27.tar.gz, LVALIUKAS, 2017; MetaCPAN )
MediaCloud-JobManager/lib/MediaCloud/JobManager/Broker/RabbitMQ.pm ( view source; MetaCPAN )
aCloud::JobManager::Broker';

use Net::AMQP::RabbitMQ;
use UUID::Tiny ':std';
use Tie::Cache;
use JSON;
use Data::Dumper;
use Readonly;

use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init(
    {
  
NORMAL => 1,
    $MediaCloud::JobManager::Job::MJM_JOB_PRIORITY_HIGH   => 2,
);

# JSON (de)serializer
my $json = JSON->new->allow_nonref->canonical->utf8;

# RabbitMQ connection credentials
has '_hos
_declare_queue( $queue_name, $durable, $declare_and_bind_exchange, $lazy_queue );
}

sub _publish_json_message($$$;$$)
{
    my ( $self, $routing_key, $payload, $extra_options, $extra_props ) = @_;

 
Selenium-UserAgent ( G/GE/GEMPESAW/Selenium-UserAgent-0.11.tar.gz, GEMPESAW, 2017; MetaCPAN )
Selenium-UserAgent/lib/Selenium/UserAgent.pm ( view source; MetaCPAN )
.11';
# ABSTRACT: Emulate mobile devices by setting user agents when using webdriver
use Moo;
use JSON;
use Cwd qw/abs_path/;
use Carp qw/croak/;
use List::Util 1.33 qw/any/;
use Selenium::Firefox::Pr
 s/UserAgent\.pm$/devices.json/;

        my $devices;
        {
            local $/ = undef;
            open (my $fh, "<", $devices_file);
            $devices = from_json(<$fh>);
            close
Agent/blob/master/lib/Selenium/devices.json>;
they're vetted against the L<values that Mozilla uses for
Firefox|https://code.cdn.mozilla.net/devices/devices.json>.

Usage looks like:

    my $sua = Se
MediaCloud-JobManager ( L/LV/LVALIUKAS/MediaCloud-JobManager-0.27.tar.gz, LVALIUKAS, 2017; MetaCPAN )
MediaCloud-JobManager/lib/MediaCloud/JobManager/Job.pm ( view source; MetaCPAN )
my_variable>) will be discarded after
each run.

Returns result on success (serializable by the L<JSON> module). The result will
be discarded if the job is added as a background process.

Provides pro
(optional) C<$args> (hashref), arguments required for running the
function (serializable by the L<JSON> module)

=item * (optional, internal) job handle to be later used by send_progress()

=back

Ret
* (optional) C<$args> (hashref), arguments needed for running the
function (serializable by the L<JSON> module)

=back

Returns result (may be false of C<undef>) on success, C<die()>s on error

=cut

IOD ( P/PE/PERLANCAR/IOD-0.9.12.tar.gz, PERLANCAR, 2017; MetaCPAN )
IOD/lib/IOD.pod ( view source; MetaCPAN )
g (2017) many implementations are still
stuck at version 1.0/1.1 of the specification.

B<JSON>. Although JSON is popular and simple, most parsers are not round-trip.
And even if the parser were round
umentation for
L<JSON> Perl module mentions the phrase "round-trip", but it uses the phrase to
mean integrity of values, not preserving comments/whitespaces.)

Note that IOD uses JSON in places.

B<Ap
ore non-newline characters with optional encoding prefix, or
a JSON string with double quotes, or a JSON array started with "[", or a JSON
hash (object) started with "{". Encoding prefix is C<!> follo
Data-DynamicValidator ( D/DM/DMOL/Data-DynamicValidator-0.05.tar.gz, DMOL, 2017; MetaCPAN )
Data-DynamicValidator/lib/Data/DynamicValidator.pm ( view source; MetaCPAN )
e port should be defined at "ports" section',
 );

The C<on> parameter defines the data path, via JSON-pointer like expression;
the C<should> parameter provides the closure, which will check the value
DarkSky-API ( M/MA/MARTYLOO/DarkSky-API-1.1.5.tar.gz, MARTYLOO, 2017; MetaCPAN )
DarkSky-API/lib/DarkSky/API.pm ( view source; MetaCPAN )
o DarkSky
package DarkSky::API;
use strict;
use warnings;
use JSON::XS;
use HTTP::Tiny;
use Moo;

our $VERSION = '1.1.5';

my $json = JSON::XS->new->pretty->canonical;

my $api   = "https://api.darksk
response->{reason}\n"
        unless $response->{success};

    return decode_json( $response->{content} );
}

sub TO_JSON { return { %{ shift() } }; }

1;

=pod

=encoding utf-8

=head1 NAME

DarkSky
::API - Provides Perl API to DarkSky

=head1 SYNOPSIS

    use DarkSky::API;
    use JSON::XS;
    use feature 'say';
    
    my $lat  = 43.6667;
    my $long = -79.4167;
    my $time = "1475363709";
MozRepl-RemoteObject ( C/CO/CORION/MozRepl-RemoteObject-0.40.tar.gz, CORION, 2017; MetaCPAN )
MozRepl-RemoteObject/lib/MozRepl/RemoteObject.pm ( view source; MetaCPAN )
package MozRepl::RemoteObject;
use strict;
use Exporter 'import';
use JSON;
use Encode qw(decode);
use Carp qw(croak);
use Scalar::Util qw(refaddr weaken);

=head1 NAME

MozRepl::RemoteObject - treat 
 function() {
    repl.linkedVars = {};
    repl.linkedIdNext = 1;
};

repl.JSON_ok = function(val,context) {
    return JSON.stringify({
        "status":"ok",
        "result": repl.wrapResults(val,
 {
        var res = eval(js);
        return repl.JSON_ok(res,context);
    } catch(e) {
        //for (var x in e) { alert(x)};
        return JSON.stringify({
            "status":"error",
        

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