Group
Extension

Matches 35358

Catmandu-Store-DBI ( N/NI/NICS/Catmandu-Store-DBI-0.04.tar.gz, NICS, 2014; MetaCPAN )
Catmandu-Store-DBI/lib/Catmandu/Store/DBI.pm ( view source; MetaCPAN )
tmandu> command line client can be used like this:

    catmandu import JSON to DBI --data_source SQLite:mydb.sqlite < data.json

=head1 DESCRIPTION

A Catmandu::Store::DBI is a Perl package that can 
Plack-Middleware-ChromeLogger ( B/BA/BAYASHI/Plack-Middleware-ChromeLogger-0.01.tar.gz, BAYASHI, 2014; MetaCPAN )
Plack-Middleware-ChromeLogger/lib/Plack/Middleware/ChromeLogger.pm ( view source; MetaCPAN )
:ChromeLogger;
use parent 'Plack::Middleware';
use Plack::Util;
use Plack::Util::Accessor qw/
    json_encoder
    enable_in_production
    disabled
/;

our $VERSION = '0.01';

sub prepare_app {
    m
sabled ) {
        $env->{'psgix.chrome_logger'} = Web::ChromeLogger->new(
            json_encoder => $self->json_encoder,
        );
    }

    my $res = $self->app->($env);

    $self->response_cb(
d1 METHODS

=over

=item prepare_app

=item call

=back


=head1 MIDDLEWARE OPTIONS

=over

=item json_encoder

pass to L<Web::ChromeLogger>. Who need to set this parameter ?

=item enable_in_producti
Pistachio ( J/JB/JBD/Pistachio-0.10.tar.gz, JBD, 2014; MetaCPAN )
Pistachio/lib/Pistachio.pm ( view source; MetaCPAN )
okenized JSON

Using modules:

=over

=item *

L<Pistachio::Language> 

=item *

L<https://github.com/joeldalley/lib-JBD> (JBD::JSON).

=back

In this example, JBD::JSON is used to parse JSON text int
n types JBD::JSON produces to CSS definitions.

 use strict;
 use warnings;

 use Pistachio;
 use Pistachio::Token;
 use Pistachio::Language;
 use JBD::JSON 'std_parse';

 # Argument: JSON input text.
 Returns arrayref of Pistachio::Tokens.
 my $tokens = sub {
     my $tokens = std_parse 'json_text', $_[0];
     [map Pistachio::Token->new($_->type, $_->value), @$tokens];
 };

 # Argument: a token t
Form-Toolkit ( J/JE/JETEVE/Form-Toolkit-0.008.tar.gz, JETEVE, 2014; MetaCPAN )
Form-Toolkit/lib/Form/Toolkit/Clerk.pm ( view source; MetaCPAN )
rk;
{
  $Form::Toolkit::Clerk::VERSION = '0.008';
}
use Moose;
use DateTime::Format::ISO8601;
use JSON;

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

has '_date_parser' => ( is => 'ro' , default =
Mail-Chimp2 ( N/NO/NORBU/Mail-Chimp2-0.5.tar.gz, NORBU, 2014; MetaCPAN )
Mail-Chimp2/lib/Mail/Chimp2.pm ( view source; MetaCPAN )
);
    $self->strict_ssl(1);
    $self->content_type('application/json');
    $self->default_method('POST');
    $self->extension('json');
    $self->base_url('https://' . $self->dc . '.api.mailchimp.
Opsview-REST ( M/MR/MRUIZ/Opsview-REST-0.013.tar.gz, MRUIZ, 2014; MetaCPAN )
Opsview-REST/lib/Opsview/REST/APICaller.pm ( view source; MetaCPAN )

  $Opsview::REST::APICaller::VERSION = '0.013';
}

use Moo::Role;

use Carp;

use Try::Tiny;
use JSON ();
use HTTP::Tiny 0.014;

has ua => (
    is      => 'ro',
    default => sub { HTTP::Tiny->new(
    'Accept'        => 'application/json',
        'Content-type'  => 'application/json',
    }; },
);

has json => (
    is      => 'ro',
    default => sub { JSON->new },
);

sub get {
    my $self 
 => $self->headers,
    });
    croak $self->_errmsg($r) unless $r->{success};

    return $self->json->decode($r->{content});
}

sub delete {
    my $self = shift;
    my $r = $self->ua->delete($self
Monitoring-Icinga ( S/SC/SCHRORG/Monitoring-Icinga-0.02.tar.gz, SCHRORG, 2014; MetaCPAN )
Monitoring-Icinga/lib/Monitoring/Icinga.pm ( view source; MetaCPAN )
se warnings;
use Carp qw(carp croak);
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use JSON::XS;

our $VERSION = '0.02';


=over

=item new (%config)

Constructor. You can set the following
t the complete URL
    $self->{'url'} = $self->{'baseurl'} . '/authkey=' . $self->{'authkey'} . '/json';

    # Exit if HTTPS requested, but LWP::Protocol::https not found
    if ($self->{'baseurl'} =
n/icinga-web-api.html for
details on how filters need to be defined. Basically, they define it in JSON
syntax, but this module requires a Perl hash reference instead.

Simple Example:

  $api->set_fil
Opsview-REST ( M/MR/MRUIZ/Opsview-REST-0.013.tar.gz, MRUIZ, 2014; MetaCPAN )
Opsview-REST/lib/Opsview/REST.pm ( view source; MetaCPAN )
$self = shift;
            require JSON;
            my $uri = Opsview::REST::Config->new(
                $obj_type,
                json_filter => JSON::encode_json({@_}),
            );
           
TheEye ( N/NO/NORBU/TheEye-0.5.tar.gz, NORBU, 2014; MetaCPAN )
TheEye/lib/TheEye/Plugin/Notify/Prowl.pm ( view source; MetaCPAN )
req = HTTP::Request->new();
    $req->method('GET');
    $req->uri($uri);

    #$req->content( to_json($content) ) if ($content);

    my $ua  = LWP::UserAgent->new();
    my $res = $ua->request($req)
Net-MyCommerce-API ( D/DH/DHATFIELD/Net-MyCommerce-API-1.0.4.tar.gz, DHATFIELD, 2014; MetaCPAN )
Net-MyCommerce-API/lib/Net/MyCommerce/API/Client.pm ( view source; MetaCPAN )
rce::API::Client;

use strict;
use warnings;

use Encode qw( decode_utf8 );
use JSON::Parse qw( json_to_perl );
use JSON::XS;
use MIME::Base64;
use REST::Client;
use Try::Tiny;
use URI::Escape qw( uri
f, %opts) = @_;
  if ($opts{method} =~ /^(POST|PUT)$/) {
    $opts{data} = encode_json($opts{data}) if $self->{sendJSON};
  } else {
    $opts{data} = '';
  }
  return %opts;
}

sub _parse_headers {
 
id};
  }
  if ($opts{method} =~ /^(POST|PUT)$/) {
    if ($self->{sendJSON}) {
      $headers->{'Content-type'} = 'application/json;charset=UTF-8';
    } else {
      $headers->{'Content-type'} = 'app
Net-Zemanta ( A/AV/AVIAN/Net-Zemanta-0.7.tar.gz, AVIAN, 2014; MetaCPAN )
Net-Zemanta/lib/Net/Zemanta/Suggest.pm ( view source; MetaCPAN )
t. Suggestions are returned as a tree
of hash and list references that correspond to the returned JSON data
structure. The most important parameters and result elements are described bellow.
For the f
Net-Zemanta ( A/AV/AVIAN/Net-Zemanta-0.7.tar.gz, AVIAN, 2014; MetaCPAN )
Net-Zemanta/lib/Net/Zemanta/Method.pm ( view source; MetaCPAN )
ethod;

use warnings;
use strict;

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

our $VERSION = '0.7';

my $SERVICE_TYPE = "rest";
my $API_VERSION = "0.0";

my $UA_SUFFIX = "Pe
shift;
	my %params = @_;

	my %merged_params = ( 	'method'  => $self->{METHOD},
				'format'  => 'json',
				'api_key' => $self->{APIKEY},
				%params );

	my $response = $self->{ua}->request(POST $se
->is_success) {
		$self->{error} = $response->status_line;
		return undef;
	}

	my $result = from_json($response->content);

	if ($result->{status} ne 'ok') {
		$self->{error} = "method returned " . $
TheEye ( N/NO/NORBU/TheEye-0.5.tar.gz, NORBU, 2014; MetaCPAN )
TheEye/lib/TheEye/Plugin/Notify/PagerDuty.pm ( view source; MetaCPAN )
:Plugin::Notify::PagerDuty;

use 5.010;
use Mouse::Role;
use LWP::UserAgent;
use URI::Escape;
use JSON;
use Data::Dumper;

# ABSTRACT: Plugin for TheEye to raise alerts in Pager Duty
#
our $VERSION = 

    required => 1,
    default  => 'https://events.pagerduty.com/generic/2010-04-15/create_event.json',
);

has 'pd_err' => (
    is        => 'rw',
    isa       => 'HashRef',
    required  => 0,
  
T');
    $req->uri($self->pd_url);
    $req->header('Content-Type' => 'application/json');

    $req->content( to_json($content) ) if ($content);

    my $ua  = LWP::UserAgent->new();
    my $res = $u
Geo-Coder-PlaceFinder ( F/FR/FRIFFIN/Geo-Coder-PlaceFinder-0.1.tar.gz, FRIFFIN, 2014; MetaCPAN )
Geo-Coder-PlaceFinder/PlaceFinder.pm ( view source; MetaCPAN )
Geo::Coder::PlaceFinder;

our $VERSION = '0.1';

use strict;

use Carp qw(croak);
use Encode;
use JSON;
use LWP::UserAgent;
use Net::OAuth;
use URI;

$Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOC
s_error ) {
		die "PlaceFinder API returned error: " . $res->status_line;
	};

	my $data = decode_json( $res->content );

	my $response = $data->{bossresponse}->{placefinder}->{results}->[0];

	my $re
TheEye ( N/NO/NORBU/TheEye-0.5.tar.gz, NORBU, 2014; MetaCPAN )
TheEye/lib/TheEye/Helper/RabbitMQ.pm ( view source; MetaCPAN )
t::More;
use JSON;

# ABSTRACT: Graphite plugin for TheEye
#
our $VERSION = '0.5'; # VERSION

has 'json' => (
    is      => 'rw',
    isa     => 'JSON',
    default => sub {
        JSON->new->utf8->
is_success) {

        my $json;
        my $result;
        eval { $json = $self->json->decode($res->content) };
        unless ($@) {
            foreach my $queue (@{$json}){
                my $na
sages},
                    });
            }
        }
        return {error => 'Could not parse JSON'} unless $result;
        return $result;
    }
    else {
        return { error => $res->status
KiokuDB ( D/DO/DOY/KiokuDB-0.57.tar.gz, DOY, 2014; MetaCPAN )
KiokuDB/lib/KiokuDB/Serializer.pm ( view source; MetaCPAN )
rom_stream";

my %types = (
    storable => "KiokuDB::Serializer::Storable",
    json     => "KiokuDB::Serializer::JSON",
    yaml     => "KiokuDB::Serializer::YAML",
);

coerce( __PACKAGE__,
    from
KiokuDB ( D/DO/DOY/KiokuDB-0.57.tar.gz, DOY, 2014; MetaCPAN )
KiokuDB/lib/KiokuDB/Backend/Serialize.pm ( view source; MetaCPAN )
eserialize);

my %types = (
    storable => "KiokuDB::Serializer::Storable",
    json     => "KiokuDB::Serializer::JSON",
    yaml     => "KiokuDB::Serializer::YAML",
    memory   => "KiokuDB::Seriali
nd::Serialize::Storable>,
L<KiokuDB::Backend::Serialize::YAML> and L<KiokuDB::Backend::Serialize::JSON>
for examples.

=head1 REQUIRED METHODS

=over 4

=item serializate $entry

Takes a L<KiokuDB::En
Dancer-Plugin-REST ( Y/YA/YANICK/Dancer-Plugin-REST-0.11.tar.gz, YANICK, 2014; MetaCPAN )
Dancer-Plugin-REST/lib/Dancer/Plugin/REST.pm ( view source; MetaCPAN )

use Carp 'croak';
use Dancer ':syntax';
use Dancer::Plugin;

my $content_types = {
    json => 'application/json',
    yml  => 'text/x-yaml',
    xml  => 'application/xml',
};

our $default_serialize
(
        ($conf && exists $conf->{serializers})
        ? $conf->{serializers}
        : { 'json' => 'JSON',
            'yml'  => 'YAML',
            'xml'  => 'XML',
            'dump' => 'Dumper',
format' => sub {
        User->find(params->{id});
    };

    # curl http://mywebservice/user/42.json
    { "id": 42, "name": "John Foo", email: "john.foo@example.com"}

    # curl http://mywebservic
Mojolicious-Plugin-DirectoryQueue ( F/FU/FUKAI/Mojolicious-Plugin-DirectoryQueue-0.01.tar.gz, FUKAI, 2014; MetaCPAN )
Mojolicious-Plugin-DirectoryQueue/lib/Mojolicious/Plugin/DirectoryQueue.pm ( view source; MetaCPAN )
ojolicious::Plugin::DirectoryQueue;

use Mojo::Base 'Mojolicious::Plugin';
use Mojo::JSON qw(decode_json encode_json);
use Directory::Queue;
use POSIX qw(chown);

our $VERSION = '0.01';


sub register
elper(
        enqueue => sub {
            my ($self, $args) = @_;
            $dirq->add(encode_json($args));
        },
    );

    $app->helper(
        dequeue => sub {
            for (my $name 
  my $data = $dirq->get($name);
               $dirq->remove($name);
               return decode_json($data) if $data;
            }
            return;
        },
    );

    $app->helper(
        s
TheEye ( N/NO/NORBU/TheEye-0.5.tar.gz, NORBU, 2014; MetaCPAN )
TheEye/lib/TheEye/Plugin/Notify/HipChat.pm ( view source; MetaCPAN )
azy     => 1,
    required => 1,
    default  => 'https://api.hipchat.com/v1/rooms/message?format=json&auth_token=',
);

has 'hc_err' => (
    is        => 'rw',
    isa       => 'HashRef',
    requir

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