Group
Extension

Matches 35358

Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/API/Bitbucket.pm ( view source; MetaCPAN )
res->{data};
    }
    else {
        my $data = $res->{data} && $res->{data}->$* ? P->data->from_json( $res->{data} ) : undef;

        return res $res->{status}, $data;
    }
}

sub _req2 ( $self, $
tent-Type' => 'application/json',
        ],
        data => $data ? P->data->to_json($data) : undef
    );

    $data = $res->{data} && $res->{data}->$* ? P->data->from_json( $res->{data} ) : undef;
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/script/pcore-vim-rpc.pl ( view source; MetaCPAN )
#!/usr/bin/env perl

package main v0.1.0;

use Pcore;
use Pcore::Util::Data qw[from_json to_json];
use Pcore::Util::Text qw[decode_utf8 encode_utf8];

my $cv = P->cv;

AnyEvent::Socket::tcp_server( '1
\n");

            last if !$msg;

            # decode message, ignore invalid json
            eval { $msg = from_json $msg->$*; 1; } or last;

            my $cmd = 'CMD_' . ( delete( $msg->[1]->{c
  data   => encode_utf8( $args->{data} ),
            ignore => 0,
        }
    );

    my $json = to_json [
        $id,
        {   status      => $res->{status},
            reason      => $res->{
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/API/twocaptcha.pm ( view source; MetaCPAN )
ri( {
        key    => $self->{api_key},
        action => 'get',
        id     => $id,
        json   => 0,
    } );

    my $url = P->uri( "$self->{api_host}/res.php?$q", proxy => $self->{proxy} )
OAuthomatic ( M/ME/MEKK/OAuthomatic-0.0202.tar.gz, MEKK, 2020; MetaCPAN )
OAuthomatic/lib/OAuthomatic/Error.pm ( view source; MetaCPAN )
blem => 'parameter_absent',
        oauth_parameters_absent => 'oauth_consumer_key',
    }

=item JSON error output

For example

    {
        error => { id => '9e9c7bddeff3',
                   mess
ose;
    use Try::Tiny;
    use OAuthomatic::Internal::Util qw/parse_http_msg_form parse_http_msg_json/;
    use Data::Dump qw(dump);
    use namespace::sweep;

    extends 'OAuthomatic::Error';
    w
e =~ m{^application/(?:x-)?json}x) {
            try {
                $reply = parse_http_msg_json($response);
            };
        }

        # FIXME: maybe compact JSON level up if it contains ju
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/API/moz.pm ( view source; MetaCPAN )
s;
use Pcore::Util::Scalar qw [is_plain_arrayref];
use Pcore::Util::Data qw[to_b64 to_uri to_json from_json];

has api_user => ( required => 1 );
has api_key  => ( required => 1 );
has free         =>
 data => to_json $params,
    );

    if ($res) {
        my $data = from_json $res->{data};

        $res = res 200, $data;
    }
    elsif ( $res->{data} ) {
        my $data = from_json $res->{data
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/Core/Event/Listener/file.pm ( view source; MetaCPAN )
Pcore::Core::Event::Listener::file;

use Pcore -class, -ansi, -const;
use Pcore::Util::Data qw[to_json];
use Pcore::Util::Scalar qw[is_ref];
use Fcntl qw[:flock];
use IO::File;
use Time::HiRes qw[];

->{data} ) {

            # serialize reference
            $ev->{text} = is_ref $ev->{data} ? to_json $ev->{data}, readable => 1 : $ev->{data};

            # indent
            $ev->{text} =~ s/^/$I
OAuthomatic ( M/ME/MEKK/OAuthomatic-0.0202.tar.gz, MEKK, 2020; MetaCPAN )
OAuthomatic/lib/OAuthomatic/Internal/Util.pm ( view source; MetaCPAN )
_json fill_httpmsg_json parse_http_msg_json);

use HTTP::Request;
use HTTP::Response;
use HTTP::Body;
use URI;
use URI::QueryParam;
use Encode;
use utf8;
use JSON qw/decode_json encode_json from_json 
to_json/;
use Try::Tiny;
use Scalar::Util qw(reftype);
use namespace::sweep;

# FIXME: throw on errors


sub fill_httpmsg_form {
    my ($http_message, $params) = @_;

    my $body_form = URI->new('ht
json {
    my $json = shift;

    if(reftype($json) =~ /^(?:HASH|ARRAY)$/) {
        return encode_json($json);    # FIXME rethrow exception as sth better
    }
    elsif(! ref($json) || reftype($json
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/App/Controller/API.pm ( view source; MetaCPAN )
package Pcore::App::Controller::API;

use Pcore -role, -const;
use Pcore::Util::Data qw[from_json to_json from_cbor to_cbor];
use Pcore::Util::Scalar qw[is_plain_arrayref];
use Pcore::WebSocket::softv
_TYPE} =~ m[\bapplication/json\b]smi ) {
            $msg = eval { from_json $req->{data} };

            # content decode error
            return 400, q[Error decoding JSON request body] if $@;
    
cbor $req->{data} };

            # content decode error
            return 400, q[Error decoding JSON request body] if $@;

            $CBOR = 1;
        }

        # invalid content type
        el
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/Core/Event/Listener/stderr.pm ( view source; MetaCPAN )
e Pcore -class, -ansi, -const;
use Pcore::Util::Text qw[remove_ansi];
use Pcore::Util::Data qw[to_json];
use Pcore::Util::Scalar qw[is_ref];
use Time::HiRes qw[];

with qw[Pcore::Core::Event::Listener
->{data} ) {

            # serialize reference
            $ev->{text} = is_ref $ev->{data} ? to_json $ev->{data}, readable => 1 : $ev->{data};

            # indent
            $ev->{text} =~ s/^/$I
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/App/API/Auth.pm ( view source; MetaCPAN )
               # Maybe [Str]
has permissions   => ();                      # Maybe [HashRef]

*TO_JSON = *TO_CBOR = sub ($self) {
    return { $self->%{qw[is_authenticated user_id user_name permission
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/API/seorank.pm ( view source; MetaCPAN )
com/api2/moz/$self->{api_key}/$domain]);

    return $res if !$res;

    my $data = P->data->from_json( $res->{data} );

    return res 200, $data;
}

1;
__END__
=pod

=encoding utf8

=head1 NAME

Pco
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/API/Client.pm ( view source; MetaCPAN )
use Pcore::Util::Scalar qw[is_plain_arrayref];
use Pcore::Util::Data qw[to_cbor from_cbor to_json from_json];
use Pcore::Util::UUID qw[uuid_v1mc_str];
use Pcore::HTTP qw[:TLS_CTX];
use Pcore::WebSocke
();
has api_ver  => ();              # eg: 'v1', default API version for relative methods
has use_json => ();

has timeout         => ();
has connect_timeout => 10;
has tls_ctx         => $TLS_CTX_HIG
ken}",
            'Content-Type' => $self->{use_json} ? 'application/json' : 'application/cbor',
        ],
        data => $self->{use_json} ? to_json $payload : to_cbor $payload
    );

    if ( !$
OAuthomatic ( M/ME/MEKK/OAuthomatic-0.0202.tar.gz, MEKK, 2020; MetaCPAN )
OAuthomatic/lib/OAuthomatic.pm ( view source; MetaCPAN )
on;
use OAuthomatic::Internal::UsageGuard;
use OAuthomatic::Internal::Util qw/serialize_json parse_http_msg_json/;
use OAuthomatic::ServerDef qw/oauthomatic_predefined_for_name/;

####################

}


sub get_json {
    my ($self, $url, $url_args) = @_;

    my $r = $self->execute_request(
        method => "GET", url => $url, url_args => $url_args);

    return parse_http_msg_json($r, 'force'
ent;
}


sub post_json {
    my $self = shift;
    my $url = shift;
    my @args = (method => "POST", 
                url => $url, 
                content_type => 'application/json; charset=utf-8');
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/API/Chrome.pm ( view source; MetaCPAN )
t;
use Pcore::API::Chrome::Tab;
use Pcore::Util::Scalar qw[weaken];
use Pcore::Util::Data qw[from_json];
use Pcore::API::Proxy;
use Pcore::API::Proxy::Server;

has bin => ();

has listen        => '//
ub tabs ( $self ) {
    my $res = P->http->get("http://$self->{listen}->{host_port}/json");

    my $tabs = from_json $res->{data};

    for my $tab ( $tabs->@* ) {
        $tab = bless { chrome => $s
{
    my $res = P->http->get( "http://$self->{listen}->{host_port}/json/new?" . ( $url // 'about:blank' ) );

    my $data = from_json $res->{data};

    my $tab = bless { chrome => $self, id => $data
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/API/Facebook.pm ( view source; MetaCPAN )
ckage Pcore::API::Facebook;

use Pcore -const, -class, -res;
use Pcore::Util::Data qw[to_uri from_json];
use Pcore::Util::Scalar qw[is_plain_arrayref];

with qw[
  Pcore::API::Facebook::User
  Pcore::
,
        url    => $url,
        data   => $data,
    );

    my $res_data = $res->{data} ? from_json $res->{data} : undef;

    if ($res) {
        if ($res_data) {
            if ( $res_data->{pagi
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/API/GitHub.pm ( view source; MetaCPAN )
nt-Type' => 'application/json',
        ],
        data => $data ? P->data->to_json($data) : undef
    );

    my $data = $res->{data} && $res->{data}->$* ? P->data->from_json( $res->{data} ) : undef;
Net-Azure-StorageClient ( D/DJ/DJZORT/Net-Azure-StorageClient-0.6.tar.gz, DJZORT, 2020; MetaCPAN )
Net-Azure-StorageClient/lib/Net/Azure/StorageClient/MIMEType.pm ( view source; MetaCPAN )
x'   => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
        'json'   => 'application/json',
    };
    if ( $filename =~ m/\.([^.]+)\z/ ) {
        my $extension = lc( $1 );
 
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/Core/Env.pm ( view source; MetaCPAN )
>set_scandeps("$dist->{share_dir}/pardeps-$self->{SCRIPT_NAME}-@{[$^V->normal]}-$Config{archname}.json");
        }
    }

    return;
}

sub set_scandeps ( $self, $path ) {
    $self->{SCANDEPS} = $p
  return $self->{main_dist};
    }
}

END {
    if ( $ENV->{SCANDEPS} ) {
        require Cpanel::JSON::XS;    ## no critic qw[Modules::ProhibitEvilModules]

        my ( $fh, $index );

        if ( 
n]

            flock $fh, LOCK_EX or die;

            local $/;

            my $deps = Cpanel::JSON::XS->new->utf8->decode(<$fh>);

            $index->@{ $deps->@* } = ();
        }
        else {
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/Dist/Build/Temp.pm ( view source; MetaCPAN )
y $tree = $self->_gather_files;

    $self->_generate_build_pl($tree);

    $self->_generate_meta_json($tree);

    my $path;

    if ($keep) {
        $path = P->path( "$self->{dist}->{root}/data/.bu
PL();
BUILD_PL

    $tree->add_file( 'Build.PL', \$template );

    return;
}

sub _generate_meta_json ( $self, $tree ) {
    my $meta = {
        abstract => 'unknown',
        author   => [         
_string_hash;

    # add META.json
    $tree->add_file( 'META.json', \CPAN::Meta->create($meta)->as_string );

    # P->file->write_text( "$self->{dist}->{root}/META.json", { crlf => 0 }, CPAN::Meta->
Pcore ( Z/ZD/ZDM/Pcore-v0.139.0.tar.gz, ZDM, 2020; MetaCPAN )
Pcore/lib/Pcore/Dist/Build/Clean.pm ( view source; MetaCPAN )
 Module::Build
    '_build/',
];

const our $FILE => [

    # general build
    qw[META.json META.yml MYMETA.json MYMETA.yml],

    # Module::Build
    qw[_build_params Build.PL Build Build.bat],

   

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