Group
Extension

Matches 35359

Chouette ( F/FR/FRACTAL/Chouette-0.102.tar.gz, FRACTAL, 2017; MetaCPAN )
Chouette/lib/Chouette/Context.pm ( view source; MetaCPAN )
;

use common::sense;

use Plack::Request::WithEncoding;
use Plack::Response;
use Log::Defer;
use JSON::XS;
use Data::Dumper;


sub new {
    my ($class, %args) = @_;

    my $self = \%args;
    bless
 eval { encode_json($msg) };

        if ($@) {
            $encoded_msg = eval { encode_json(_json_clean($msg)) };

            if ($@) {
                $encoded_msg = "Failed to JSON clean: " . Dum
}) {
        $self->logger->warn("sending JSON error: $body->{error}");
    }

    return $self->respond_raw($http_code // 200, 'application/json', encode_json($body));
}



sub done {
    die shift->
PONAPI-Tools ( M/MI/MICKEY/PONAPI-Tools-0.001002.tar.gz, MICKEY, 2017; MetaCPAN )
PONAPI-Tools/lib/PONAPI/Document/Builder/Resource.pm ( view source; MetaCPAN )
ION

C<PONAPI::Document::Builder::Resource> is used internally by
C<PONAPI::Document> to build C<{json:api}> documents.  Generally,
these will be created by C<< PONAPI::Document->add_resources >>, whi
PONAPI-Tools ( M/MI/MICKEY/PONAPI-Tools-0.001002.tar.gz, MICKEY, 2017; MetaCPAN )
PONAPI-Tools/lib/PONAPI/Document.pm ( view source; MetaCPAN )
# ABSTRACT: a {json:api} document building class
package PONAPI::Document;

use strict;
use warnings;

use parent 'PONAPI::Document::Builder::Document';

1;

__END__

=pod

=encoding UTF-8

=head1 NAM
E

PONAPI::Document - a {json:api} document building class

=head1 VERSION

version 0.001002

=head1 SYNOPSIS

    use PONAPI::Document;

    my $document = PONAPI::Document->new(
        version  => 
turn a valid {json:api} document
    # as a perl hash, which you can later turn into JSON.
    my $result = $document->build;

=head1 DESCRIPTION

C<PONAPI::Document> lets you build {json:api} complia
PONAPI-Tools ( M/MI/MICKEY/PONAPI-Tools-0.001002.tar.gz, MICKEY, 2017; MetaCPAN )
PONAPI-Tools/lib/PONAPI/Names.pm ( view source; MetaCPAN )
SCRIPTION

This module implements the L<member name restrictions|http://jsonapi.org/format/#document-member-names>
from the {json:api} specification; it can be used by repositories
to implement strict
WWW-Foreman-API ( S/SK/SKYSYMBOL/WWW-Foreman-API-0.001.tar.gz, SKYSYMBOL, 2017; MetaCPAN )
WWW-Foreman-API/lib/WWW/Foreman/API.pm ( view source; MetaCPAN )

use Encode;
use Exporter 'import';
my @EXPORT = ();
my @EXPORT_OK = qw(get post put delete);
use JSON;
use MIME::Base64;
use REST::Client;

# ABSTRACT: Perl client to the Foreman API

sub new {
    m
 my $headers = $self->set_headers();
    $client->GET($path, $headers);
    my $response = decode_json(decode_utf8($client->responseContent()));

    return $response;
}

sub post {
    my ($self, $pa
    croak 'The #2 argument to post() must be a hash' if ref($_[2]) ne 'HASH';
    $params = JSON::encode_json($params);
    my $client = $self->create_client();
    my $headers = $self->set_headers();
AnyEvent-Task ( F/FR/FRACTAL/AnyEvent-Task-0.805.tar.gz, FRACTAL, 2017; MetaCPAN )
AnyEvent-Task/lib/AnyEvent/Task/Server/Worker.pm ( view source; MetaCPAN )
file created by our parent before the fork
use IO::Select;
use JSON::XS;
use Scalar::Util qw/blessed/;


my $setup_has_been_run;
my $json;
my $sel;



sub handle_worker {
  eval {
    handle_worker_wr

  AnyEvent::Util::fh_nonblocking $fh, 0;
  AnyEvent::Util::fh_nonblocking $monitor_fh, 0;

  $json = JSON::XS->new->utf8;

  $sel = IO::Select->new;
  $sel->add($fh, $monitor_fh);

  while(1) {
    m
TR};
    POSIX::_exit(1);
  } elsif ($read_rv == 0) {
    POSIX::_exit(1);
  }

  for my $input ($json->incr_parse($buf)) {
    my $output;
    my $output_meta = {};

    my $cmd = shift @$input;
    
WWW-Shorten-Yourls ( C/CA/CAPOEIRAB/WWW-Shorten-Yourls-1.001.tar.gz, CAPOEIRAB, 2017; MetaCPAN )
WWW-Shorten-Yourls/lib/WWW/Shorten/Yourls.pm ( view source; MetaCPAN )
ten::Yourls;

use strict;
use warnings;
use Carp ();
use File::HomeDir ();
use File::Spec ();
use JSON::MaybeXS;
use Path::Tiny qw(path);
use Scalar::Util qw(blessed);
use URI ();

use base qw( WWW::S
 password server signature),
        ];
        return [@{$attrs}];
    }
}

# _json_request (static, private)
sub _json_request {
    my $url = shift;
    Carp::croak("Invalid URI object") unless $ur
ation/json}) {
        Carp::croak("Unexpected response: $content");
    }
    my $json = decode_json($content);
    Carp::croak("Invalid data returned: $content") unless $json;
    return $json;
}

#
Locale-Meta ( A/AM/AMORTEGUI/Locale-Meta-0.008.tar.gz, AMORTEGUI, 2017; MetaCPAN )
Locale-Meta/lib/Locale/Meta.pm ( view source; MetaCPAN )
rict;
use warnings;
use utf8;
use Carp;
use JSON::MaybeXS qw/JSON/;

our $VERSION = "0.008";

=head1 NAME

Locale::Meta - Multilanguage support loading json structures based on Locale::Wolowitz.

=hea
d1 VERSION

version 0.008

=head1 SYNOPSIS

  #in ./i18n/file.json
  {
    "en": {
      "color": {
        "trans" : "color"
        "meta": {
          "searchable": 1,
        }
      }
    },
    
ency of the 
file names as part of the definition of the language, to manage a new json data structure 
for the .json files definitions, and also, add a meta field in order to be 
able to extend the u
PONAPI-Tools ( M/MI/MICKEY/PONAPI-Tools-0.001002.tar.gz, MICKEY, 2017; MetaCPAN )
PONAPI-Tools/lib/PONAPI/Tools.pm ( view source; MetaCPAN )
{json:api} document building tools
package PONAPI::Tools;

use strict;
use warnings;

our $VERSION = '0.001002';

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

PONAPI::Tools - PONAPI-Tools - {json:
building tools

=head1 VERSION

version 0.001002

=head1 DESCRIPTION

Various tools for building {json:api} compatiable documents.

Used by L<PONAPI::Server>

For information about creating documents,
AnyEvent-Task ( F/FR/FRACTAL/AnyEvent-Task-0.805.tar.gz, FRACTAL, 2017; MetaCPAN )
AnyEvent-Task/lib/AnyEvent/Task.pm ( view source; MetaCPAN )
protocol between the client and the worker process is currently JSON-based, all arguments and return values must be serializable to JSON. This includes most perl scalars like strings, a limited range 


Document hung_worker_timeout and SIGALRM stuff

Wire protocol:
  - Support something other than JSON? Sereal?
  - Document the protocol?

need tests for the following features:
  - checkout_done sig
WWW-Shorten-Naver ( J/JE/JEEN/WWW-Shorten-Naver-0.03.tar.gz, JEEN, 2017; MetaCPAN )
WWW-Shorten-Naver/lib/WWW/Shorten/Naver.pm ( view source; MetaCPAN )
package WWW::Shorten::Naver;
use strict;
use warnings;
use Carp ();
use JSON::MaybeXS;
use URI ();
use Scalar::Util qw(blessed);
use parent qw( WWW::Shorten::generic Exporter );
our @EXPORT = qw(new V
ation/json}) {
        Carp::croak("Unexpected response: $content");
    }
    my $json = decode_json($content);
    Carp::croak("Invalid data returned: $content") unless $json;
    return $json->{res
Catmandu-CA ( P/PI/PIETERDP/Catmandu-CA-0.06.tar.gz, PIETERDP, 2017; MetaCPAN )
Catmandu-CA/lib/Catmandu/CA/API/QueryBuilder.pm ( view source; MetaCPAN )
e JSON;

has field_list => (is => 'ro', required => 1);

has query => (is => 'lazy');

sub _build_query {
    my $self = shift;

    if (scalar @{$self->field_list} == 0) {
        return encode_json(
printf('%s', $field);
        $query->{'bundles'}->{$def} = {
            'returnAsArray' => JSON::true,
            'locale' => 'nl_BE'
        };
    }

    return encode_json($query);
}

1;
__END__
Catmandu-CA ( P/PI/PIETERDP/Catmandu-CA-0.06.tar.gz, PIETERDP, 2017; MetaCPAN )
Catmandu-CA/lib/Catmandu/CA/API/Request.pm ( view source; MetaCPAN )
RSION = '0.06';

use strict;
use warnings;

use Moo;
use Catmandu::Sane;

use LWP::UserAgent;
use JSON;

use Catmandu::CA::API::Login;

has url       => (is => 'ro', required => 1);
has url_query => (
;
    my $response = $self->ua->get($url);
    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } elsif ($response->code == 404) {
        return {};
    } else
f->token);
    my $response = $self->ua->put($url, Content => $data, Content_type => 'application/json');

    if (!$response->is_success) {
        Catmandu::HTTPError->throw({
                code  
Catmandu-CA ( P/PI/PIETERDP/Catmandu-CA-0.06.tar.gz, PIETERDP, 2017; MetaCPAN )
Catmandu-CA/lib/Catmandu/CA/API/Login.pm ( view source; MetaCPAN )
Catmandu::Sane;

use Data::Dumper qw(Dumper);

use LWP::UserAgent;
use HTTP::Request::Common;
use JSON;

has username => (is => 'ro', required => 1);
has password => (is => 'ro', required => 1);
has u
nse = $self->ua->request($request);
    if ($response->is_success) {
        my $content = decode_json($response->decoded_content);
        return $content->{'authToken'};
    } else {
        Catmand
Net-Hadoop-WebHDFS ( B/BU/BURAK/Net-Hadoop-WebHDFS-0.8.tar.gz, BURAK, 2017; MetaCPAN )
Net-Hadoop-WebHDFS/lib/Net/Hadoop/WebHDFS.pm ( view source; MetaCPAN )
package Net::Hadoop::WebHDFS;

use strict;
use warnings;
use Carp;

use JSON::XS qw//;

use Furl;
use File::Spec;
use URI;
use Try::Tiny;

use constant GENERIC_FS_ACTION_WITH_NO_PATH => '';

our $VERS
   my $res = $self->operate_requests('PUT', $path, 'MKDIRS', \%options);
    $self->check_success_json($res, 'boolean');
}
$OPT_TABLE{MKDIRS} = ['permission'];
sub mkdirs { (shift)->mkdir(@_); }

# cu
rate_requests('PUT', $path, 'RENAME', {%options, destination => $dest});
    $self->check_success_json($res, 'boolean');
}

# curl -i -X DELETE "http://<host>:<port>/webhdfs/v1/<path>?op=DELETE
#     
Catmandu-CA ( P/PI/PIETERDP/Catmandu-CA-0.06.tar.gz, PIETERDP, 2017; MetaCPAN )
Catmandu-CA/lib/Catmandu/CA/API.pm ( view source; MetaCPAN )
package Catmandu::CA::API;

use strict;
use warnings;

use Catmandu::Sane;
use Moo;

use JSON;
use Catmandu::CA::API::QueryBuilder;
use Catmandu::CA::API::Request;

has username   => (is => 'ro', requ
  password  => $self->password,
        lang      => $self->lang
    );
    return $r->put(encode_json($data));
}

sub update {
    my ($self, $id, $data) = @_;
    my $r = Catmandu::CA::API::Request-
  password  => $self->password,
        lang      => $self->lang
    );
    return $r->put(encode_json($data));
}

sub delete {
    my ($self, $id) = @_;
    my $r = Catmandu::CA::API::Request->new(
 
Facebook-Messenger-Client ( M/MA/MARGHI/Facebook-Messenger-Client-1.0.tar.gz, MARGHI, 2017; MetaCPAN )
Facebook-Messenger-Client/lib/Facebook/Messenger/Client.pm ( view source; MetaCPAN )
t( $url, json => $payload );

	my $response = $tx->success();
	unless( $response ) {
		my $error = $tx->error();
		die( sprintf( 'Error: %s', $error->{message} ) )
	}

	return $response->json();
}

su
 $error = $tx->error();
		die( sprintf( 'Error: %s', $error->{message} ) )
	}

	return $response->json();
}

__PACKAGE__->meta()->make_immutable();

1;

__END__

=pod

=head1 NAME

Facebook::Messenger
AnyEvent-Task ( F/FR/FRACTAL/AnyEvent-Task-0.805.tar.gz, FRACTAL, 2017; MetaCPAN )
AnyEvent-Task/lib/AnyEvent/Task/Client/Checkout.pm ( view source; MetaCPAN )
->()';
    shift @$request;
  }

  $self->_install_timeout_timer;

  $self->{worker}->push_write( json => [ 'do', {}, @$request, ], );

  my $timer;

  if ($self->{log_defer_object}) {
    $timer = $s
lete $self->{cmd_handler};

    $self->_try_to_fill_requests;
  };

  $self->{worker}->push_read( json => $self->{cmd_handler} );
}

sub DESTROY {
  my ($self) = @_;

  $self->{client}->remove_pending
    $self->{client}->populate_workers if $self->{client};
    } else {
      $worker->push_write( json => [ 'dn', {} ] );
      $self->{client}->make_worker_available($worker) if $self->{client};
    
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Task/Scheduler.pm ( view source; MetaCPAN )
 strict;
use warnings;
use base 'Armadito::Agent::Task';

use MIME::Base64;
use Data::Dumper;
use JSON;

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

	my $self = $class->SUPER::new(%params);

	if ( $param
se ) = @_;

	$self->{logger}->info( "Error Response : " . $response->content() );
	my $obj = from_json( $response->content(), { utf8 => 1 } );
	$self->{logger}->error( Dumper($obj) );

	return $self;
fos;
	my $json_text = to_json( $self->{jobj} );

	my $response = $self->{glpi_client}->sendRequest(
		"url"   => $self->{agent}->{config}->{server}[0] . "/api/schedulers",
		message => $json_text,
		m
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Task/AVConfig.pm ( view source; MetaCPAN )
Armadito::Agent::Task::AVConfig;

use strict;
use warnings;
use base 'Armadito::Agent::Task';
use JSON;
use Data::Dumper;

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

	my $self = $class->SUPER::new(%para
se ) = @_;

	$self->{logger}->info( "Error Response : " . $response->content() );
	my $obj = from_json( $response->content(), { utf8 => 1 } );
	$self->{logger}->error( Dumper($obj) );

	return $self;
 $json_text = to_json( $self->{jobj} );
	$self->{logger}->debug($json_text);

	my $response = $self->{glpi_client}->sendRequest(
		"url"   => $self->{glpi_url} . "/api/avconfigs",
		message => $json_t

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