Group
Extension

Matches 35358

Badge-Simple ( H/HA/HAUKEX/Badge-Simple-0.04.tar.gz, HAUKEX, 2018; MetaCPAN )
Badge-Simple/misc/scrape_cpantesters.pl ( view source; MetaCPAN )
ny ();
use Text::CleanFragment qw/clean_fragment/;
use Regexp::Common qw/balanced delimited/;
use JSON::MaybeXS ();
use XML::LibXML ();
use Data::Dump qw/dd/;

# Badge-Simple 0.01 had a ton of CPAN Te


my $GET_CACHE = dir($FindBin::Bin,'scrape_cache'); # for sub get
$GET_CACHE->mkpath(1);

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

my $cpt_js = get('http://www.cpantesters.org/static/distro/B/Badg
ons = $json->decode($1);
my $version = $versions->[-1];

$cpt_js =~ m{ \b var \s+ results \s* = \s*
	( $RE{balanced}{-parens=>'{}'} ) \s* (?: ; | \z ) }xms
		or die $cpt_js;
my $reports = $json->decod
Mojolicious-Plugin-Mailgun ( M/MR/MRAMBERG/Mojolicious-Plugin-Mailgun-0.09.tar.gz, MRAMBERG, 2018; MetaCPAN )
Mojolicious-Plugin-Mailgun/lib/Mojolicious/Plugin/Mailgun.pm ( view source; MetaCPAN )
->routes->post(
    '/dummy/mail/*domain/messages' => sub {
      my $c = shift;
      $c->render(json =>
          {id => 1, params => $c->req->params->to_hash, url => $c->req->url->to_abs});
    }
 
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/genapi/typedjson.pm ( view source; MetaCPAN )
package typedjson;


# based on code from EDG::WP4::CCM::Fetch::JSONProfileTyped
# (and EDG::WP4::CCM::Fetch::ProfileCache::_decode_json)
# for an explanation and original code, see
# https://github.c
l/Fetch/JSONProfileTyped.pm
# This was ported and modified here because CCM is not that trivial to install from source

use strict;
use warnings;

use JSON::XS v2.3.0 qw(decode_json encode_json);

use
 parent qw(Exporter);

our @EXPORT = qw(process_json);

use B;
use Scalar::Util qw(blessed);

$SIG{__DIE__} = \&confess;

# Turns a JSON Object (an unordered associative array) into a Perl hash
# refe
Resque-Plugin-Delay ( M/ME/MERU/Resque-Plugin-Delay-0.05.tar.gz, MERU, 2018; MetaCPAN )
Resque-Plugin-Delay/lib/Resque/Plugin/Delay/Dequeue.pm ( view source; MetaCPAN )
que::Plugin::Delay::Dequeue;
use 5.008001;
use strict;
use warnings;

use Moose::Role;
use JSON qw/decode_json/;

around pop => sub {
    my ( $orig, $self, $queue ) = @_;
    my $payload = $self->red
is->lpop($self->key( queue => $queue ));
    return unless $payload;
    $payload = decode_json($payload);

    my $job = $self->new_job({
        payload => $payload,
        queue   => $queue
    })
Deliantra ( M/ML/MLEHMANN/Deliantra-2.01.tar.gz, MLEHMANN, 2018; MetaCPAN )
Deliantra/Deliantra/Protocol/Base.pm ( view source; MetaCPAN )
use Compress::LZF;
use Scalar::Util ();

use Socket ();

use Deliantra::Protocol::Constants;

use JSON::XS ();

=item new Deliantra::Protocol::Base host => ..., port => ..., user => ..., pass => ...

ken           => "a",
      s_version       => { },

      tilesize        => 32,
      json_coder      => (JSON::XS->new->max_size(1e7)->utf8),
      @_
   }, $class;

   $self->{fh_guard} = AnyEvent
ragmented packets
      %{$self->{setup_req} || {} },
   };

   $self->send ("version " . $self->{json_coder}->encode ({
      protver    => 1,
      client     => "Deliantra Perl Module [$0]",
      
WebService-HMRC ( N/NP/NPRATER/WebService-HMRC-0.02.tar.gz, NPRATER, 2018; MetaCPAN )
WebService-HMRC/lib/WebService/HMRC/Request.pm ( view source; MetaCPAN )
package WebService::HMRC::Request;

use 5.006;
use Carp;
use JSON::MaybeXS qw(encode_json);
use LWP::UserAgent;
use Moose;
use namespace::autoclean;
use URI;
use WebService::HMRC::Response;


=head1 N
s_success;
    
    # post data as json to an application-restricted endpoint
    my $data = {serviceNames => ['mtd-vat']};
    my $response = $r->post_endpoint_json({
        endpoint => '/create-tes
ethods for calling api endpoints, mapping their response
into a standard class and decoding their JSON payload. It also provides a
LWP::UserAgent with appropriate headers set and a lower-level method 
Deliantra ( M/ML/MLEHMANN/Deliantra-2.01.tar.gz, MLEHMANN, 2018; MetaCPAN )
Deliantra/Deliantra.pm ( view source; MetaCPAN )
$TILE *FACE *FACEDATA
   TILESIZE CACHESTRIDE
   editor_archs arch_extents
);

use JSON::XS qw(decode_json encode_json);

our $LIB = $ENV{DELIANTRA_LIBDIR};

our $VARDIR = $ENV{HOME}    ? "$ENV{HOME}/
    'eq' => sub { "$_[0]" eq "$_[1]" },
      'ne' => sub { "$_[0]" ne "$_[1]" },
   ;

   sub TO_JSON {
      $_[0][0]
   }
}

sub Deliantra::MoveType::new {
   my ($class, $string) = @_;

   my $mas
e archetype
   if (exists $ob->{attach}) {
      my $arch = $ARCH{$ob->{_name}};
      my $js   = JSON::XS->new->utf8->canonical (1);

      if (defined $arch->{attach}
          && $js->encode ($js->
QBit-Application-Model-DBManager ( M/MA/MADSKILL/QBit-Application-Model-DBManager-0.022.tar.gz, MADSKILL, 2018; MetaCPAN )
QBit-Application-Model-DBManager/lib/QBit/Application/Model/DBManager.pm ( view source; MetaCPAN )
tion::DBManager::Grammar $text;
        }
    );

    return $filter if ($opts{'type'} || '') eq 'json_data';

    return $self->_get_db_filter_from_data(
        $filter, %opts,
        model_fields 
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/genapi/gen.pl ( view source; MetaCPAN )
th qw(make_path);
use Config::INI::Reader;
use Data::Dumper;
use Template;
use Readonly;
use typedjson;

my $debug = 1;

Readonly my $GEN_API_DIR => dirname(abs_path($0));
Readonly my $API_DIR => "$GE
options from JSON
        my $json = $mcfg->{json};

        if ((grep {$mcfg->{method} eq $_} @METHODS_REQUIRE_OPTIONS) && !$json) {
            die "$err_prefix data should contain JSON for options 
for method $method $mcfg->{method}";
        }
        $mcfg->{options} = process_json($json, $templates) if $json;
        foreach my $kn (sort keys %{$mcfg->{options}}) {
            if (grep {$_ eq
QBit-WebInterface-Routing ( M/MA/MADSKILL/QBit-WebInterface-Routing-0.010.tar.gz, MADSKILL, 2018; MetaCPAN )
QBit-WebInterface-Routing/lib/QBit/WebInterface/Routing.pm ( view source; MetaCPAN )
Accept') || '') =~ /(application\/json|text\/javascript)/) {
            $self->response->content_type("$1; charset=UTF-8");
            $self->response->data(to_json({error => $exception->message()})
QBit-WebInterface ( M/MA/MADSKILL/QBit-WebInterface-0.033.tar.gz, MADSKILL, 2018; MetaCPAN )
QBit-WebInterface/lib/QBit/WebInterface.pm ( view source; MetaCPAN )
Accept') || '') =~ /(application\/json|text\/javascript)/) {
            $self->response->content_type("$1; charset=UTF-8");
            $self->response->data(to_json({error => gettext('Internal Serve
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/lib/Net/OpenStack/Client/API/Convert.pm ( view source; MetaCPAN )
ck::Client::Request;

# cannot use 'use Types::Serialiser'; it is incompatible with JSON::XS 2.X (eg on EL6)
use JSON::XS;
use Readonly;

use base qw(Exporter);

our @EXPORT_OK = qw(convert process_ar
ce internal conversion to float/double
    boolean => sub {my $val = shift; return $val ? JSON::XS::true : JSON::XS::false;},
};

# Aliases for each dispatch
Readonly::Hash my %CONVERT_ALIAS => {
};

ptions
    # The processed options are removed from %origopts
    # TODO: naming conflict between JSON key, parameter and template name? (handled in gen.pl)
    foreach my $name (@{$cmdhs->{templates}
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/lib/Net/OpenStack/Client/Request.pm ( view source; MetaCPAN )
=> {
    $HDR_ACCEPT => 'application/json, text/plain',
    $HDR_ACCEPT_ENCODING => 'identity, gzip, deflate, compress',
    $HDR_CONTENT_TYPE => 'application/json',
};


=head1 NAME

Net::OpenStack::
";
    }

    return $endpoint;
}

=item opts_data

Generate hashref from options, to be used for JSON encoding.
If C<raw> attribute is defined, ignore all options and return it.

Returns empty hasref
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/lib/Net/OpenStack/Client/API/Version/v1.pod ( view source; MetaCPAN )
s

=item No optional url / endpoint parameters

=item Options

=over

=item raw: hashref used for JSON body, ignoring all options

=item All options starting with C<__> are passed as options to C<Net:
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/lib/Net/OpenStack/Client/REST.pm ( view source; MetaCPAN )
DR_X_AUTH_TOKEN);
use Net::OpenStack::Client::Response;
use REST::Client;
use LWP::UserAgent;
use JSON::XS;

use Readonly;

# Map with HTTP return codes indicating success
#   if method is missing (on
 => [204, 201], # yes, 201 when deleting a token
    };


# JSON::XS instance
# sort the keys, to create reproducable results
my $json = JSON::XS->new()->canonical(1);

=head1 methods

=over

=cut

su
e repsonse, repsonse headers and error message.
# Processes the repsonse code, including possible JSON decoding
# Reports error and returns err (with repsonse undef)
sub _call
{
    my ($self, $method
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/lib/Net/OpenStack/Client/Error.pm ( view source; MetaCPAN )
ew(@_);
}


=item new

Create new error instance from options, e.g. from a (decoded dereferenced) JSON response.

Arguments are handled by C<set_error>.

=cut

sub new
{
    my $this = shift;
    my $
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/lib/Net/OpenStack/Client.pm ( view source; MetaCPAN )
in/.openrc',
        log => Log::Log4perl->get_logger()
        );

For debugging, including full JSON request / repsonse and headers (so contains sensitive data!):
    use Net::OpenStack::Client;
   
QBit-WebInterface ( M/MA/MADSKILL/QBit-WebInterface-0.033.tar.gz, MADSKILL, 2018; MetaCPAN )
QBit-WebInterface/lib/QBit/WebInterface/Controller.pm ( view source; MetaCPAN )
($text);
}

sub as_json {
    my ($self, $data) = @_;

    $self->response->content_type('application/json; charset=UTF-8');
    $self->response->data(to_json($data));
}

sub as_jsonp {
    my ($self,
response->content_type('text/javascript; charset=UTF-8');
    $self->response->data("$func(" . to_json($data) . ')');
}

sub from_template {
    my ($self, $name, %opts) = @_;

    $self->response->da
           }
                return $dump_text;
            },
            to_json => sub {
                return to_json(shift);
            },
            cmd_link => sub {
                my ($new
qbit ( M/MA/MADSKILL/qbit-2.8.tar.gz, MADSKILL, 2018; MetaCPAN )
qbit/lib/qbit/StringUtils.pm ( view source; MetaCPAN )
package Exception::BadArguments::InvalidJSON;
$Exception::BadArguments::InvalidJSON::VERSION = '2.8';
use base qw(Exception::BadArguments);

=head1 Name

qbit::StringUtils - Functions to manipulate st
use JSON::XS ();
use POSIX qw(locale_h);

BEGIN {
    our (@EXPORT, @EXPORT_OK);

    @EXPORT = qw(
      html_encode html_decode uri_escape check_email idn_to_unicode get_domain to_json from_json for
e {
        return;
    }
}

=head2 to_json

B<Arguments:>

=over

=item

B<$data> - scalar.

=back

B<Return value:> string, C<$data> as JSON.

=cut

sub to_json($;%) {
    my ($data, %opts) = @_;

 
Net-OpenStack-Client ( S/ST/STDWEIRD/Net-OpenStack-Client-0.1.4.tar.gz, STDWEIRD, 2018; MetaCPAN )
Net-OpenStack-Client/lib/Net/OpenStack/Client/API/Identity/v3.pod ( view source; MetaCPAN )
ption: string (JSON path: domain -> description)

=item enabled: boolean (JSON path: domain -> enabled)

=item name: string (JSON path: domain -> name)

=item raw: hashref used for JSON body, ignoring
ion: string (JSON path: project -> description)

=item domain_id: string (JSON path: project -> domain_id)

=item enabled: boolean (JSON path: project -> enabled)

=item name: string (JSON path: proje
ct -> name)

=item parent_id: string (JSON path: project -> parent_id)

=item raw: hashref used for JSON body, ignoring all options

=item All options starting with C<__> are passed as options to C<Ne

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