Group
Extension

Matches 35359

WWW-Pushover ( O/OG/OGATA/WWW-Pushover-0.01.tar.gz, OGATA, 2014; MetaCPAN )
WWW-Pushover/blib/lib/WWW/Pushover.pm ( view source; MetaCPAN )
    => eval {
    return 0 if HAVE_HTTP_TINY; # unnecessary
    require LWP::UserAgent; 1;
};
use JSON::PP;

use constant ENDPOINT_URL   => 'https://api.pushover.net';
use constant HTTP_TIMEOUT   => 1
my $res = $self->_http_get( ENDPOINT_URL . '/1/sounds.json?token=' . $self->{token} );
    if ( $res->{success} ) {
        my $data = $self->_json_parser->decode($res->{content});
        my @sounds 
Sounds API is failed.";
    }
}

# JSON Parser accessor
sub _json_parser {
    my $self = shift;
    $self->{json_parser} ||= JSON::PP->new();
    return $self->{json_parser};
}

# Browser accessor
su
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Manual/Applications.pod ( view source; MetaCPAN )
layouts/ (required)
	|----------- main.html (required)
	|----- i18n/
	|-------- es.json
	|-------- he_and_it.coll.json

The C<app.psgi> file is a standard L<PSGI> application that configures and
initi
ews and templates reside. These will
mostly be HTML templates, but can actually be anything, even JSON or XML
or whatever. Views and templates are handled by Leyland's view classes,
and are rendered a
irectory. Once again, this is optional and
purely a suggestion. If used, this directory will hold JSON localization
files for localizing your application with L<Locale::Wolowitz>. See
L<Leyland::Manua
Mojolicious-Plugin-DumpyLog ( A/AM/AMIRITE/Mojolicious-Plugin-DumpyLog-0.01.tar.gz, AMIRITE, 2014; MetaCPAN )
Mojolicious-Plugin-DumpyLog/lib/Mojolicious/Plugin/DumpyLog.pm ( view source; MetaCPAN )
oo = ( bar => 'baz' );
        $self->debug( "foo", "bar", "baz", \%foo );
        $self->render( json => [] );
    }

=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee d
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/View.pm ( view source; MetaCPAN )
 method receives the name of a view (or "template" if you will, such
as 'index.html' or 'resource.json'), and a hash-ref of variables to be
available for the template (known as the "context"). Leyland
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Manual/Upgrading.pod ( view source; MetaCPAN )
new; # = MyLeylandApp

=item * Leyland no longer uses L<JSON::Any> as its JSON object. It now uses L<JSON> (which will automatically load L<JSON::XS> if available). The interface should be the same, b
robably should be aware of this change. Note, also, that C<convert_blessed> is now enabled on the JSON object.

=item * Leyland is now L<Moo>-based instead of L<Moose>-based, so it is much lighter tha
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland.pm ( view source; MetaCPAN )
ces to representations in the format your client
wants to receive, like JSON and XML. It will also automatically deserialize
JSON/XML requests coming from the client to Perl data-structures.

=item * 
he request mime types, let's
	# attempt to serialize the error ourselves if the client accepts
	# JSON or XML
	foreach (@{$c->wanted_mimes}) {
		return $c->_respond(
			$exp->code,
			{ 'Content-Type'
mime} eq 'text/html' ||
			$_->{mime} eq 'application/xhtml+xml' ||
			$_->{mime} eq 'application/json' ||
			$_->{mime} eq 'application/atom+xml' ||
			$_->{mime} eq 'application/xml';
	}

	# We do n
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Manual/Controllers.pod ( view source; MetaCPAN )
s look at a pretty complete example:

	get '^/posts$' accepts 'text/html|application/json' returns 'application/json' {
		my @posts = MyDatabase->load_posts();
		return { posts => \@posts };
	}

The a
hat
has an empty prefix). It will only accept C<text/html> or C<application/json>
from the client, and will only return JSON. The following HTTP methods
are available:

=over

=item * get: for C<GET> 
.

	post '^/posts$' returns 'application/json' {
		my @posts = $c->forward('GET:/posts');
		# do stuff with @posts
	}

	get '^/posts$' returns 'application/json' is 'internal' {
		return MyDatabase->l
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Manual/Localization.pod ( view source; MetaCPAN )
e.
This is why I created L<Locale::Wolowitz>, which is a very simple localization
system based on JSON. This is also the reason why, as opposed to logging
and view classes, Leyland only provides C<Loc
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Context.pm ( view source; MetaCPAN )
TTP request and Leyland response

use Moo;
use namespace::clean;

use Carp;
use Data::Dumper;
use JSON;
use Leyland::Exception;
use Leyland::Logger;
use Module::Load;
use Text::SpanningTable;
use Try:
nvenience. You will use the C<set_user()> method
to set the value of this attribute.

=head2 json

A L<JSON::Any> object for usage by routes as they see fit.

=head2 xml

An L<XML::TreePP> object for 
eq 'Leyland::Logger' }
);

has 'json' => (
	is => 'ro',
	isa => sub { die "json must be a JSON object" unless ref $_[0] && ref $_[0] eq 'JSON' },
	default => sub { JSON->new->utf8(0)->convert_blessed 
WebService-Redmine ( I/IG/IGELHAUS/WebService-Redmine-0.06.tar.gz, IGELHAUS, 2014; MetaCPAN )
WebService-Redmine/lib/WebService/Redmine.pm ( view source; MetaCPAN )
gs;

our $VERSION = '0.06';

use URI;
use URI::QueryParam;
use LWP::UserAgent;
use JSON::XS qw/encode_json decode_json/;
use Encode   qw/decode/;

=pod

=encoding UTF-8

=head1 NAME

WebService::Redmi
edMine REST API. Please note that although
RedMine API is designed to support both JSON and XML, this module is B<JSON only>.

=head1 METHODS NAMING AND OTHER CALL CONVENTIONS

All methods are dynamic
f->{protocol}://$auth$self->{host}";

	$self->{ua}->default_header('Content-Type' => 'application/json');
	
	if (length $self->{key}) {
		$self->{ua}->default_header('X-Redmine-API-Key' => $self->{key
Leyland ( I/ID/IDOPEREL/Leyland-1.000002.tar.gz, IDOPEREL, 2014; MetaCPAN )
Leyland/lib/Leyland/Exception.pm ( view source; MetaCPAN )
no idea what went wrong",
			mimes => {
				'text/html' => 'error.html',
				'application/json' => 'error.json',
			},
		});

	# or you can create an error that redirects (don't do this unless
	# you 
Business-YQL ( A/AA/AANARI/Business-YQL-0.0004.tar.gz, AANARI, 2014; MetaCPAN )
Business-YQL/lib/Business/YQL.pm ( view source; MetaCPAN )
TP::Request::Common qw(GET POST);
use URI;
use URI::QueryParam;
use LWP::UserAgent;
use JSON qw(to_json from_json);
use Carp qw(croak);
use Log::Any qw($log);
use Try::Tiny;

has scheme  => (is => 'ro
(
        q           => $query,
        format      => 'json',
        env         => 'store://datatables.org/alltableswithkeys',
        jsonCompat  => 'new',
    );

    my $uri = URI->new($self->u
  $res = $self->ua->request($req);
    }
    return from_json $res->content
        if $res->code =~ /^4/x;
    return $res->content ? from_json($res->content)->{query}{results} : 1;
}

sub _log_conte
Plack-Middleware-JSONParser ( Y/YO/YOSUKEF/Plack-Middleware-JSONParser-0.02.tar.gz, YOSUKEF, 2014; MetaCPAN )
Plack-Middleware-JSONParser/lib/Plack/Middleware/JSONParser.pm ( view source; MetaCPAN )
package Plack::Middleware::JSONParser;
use strict;
use warnings;
use JSON;
use Hash::MultiValue;
use Plack::Request;

our $VERSION = "0.02";

use parent 'Plack::Middleware';

sub call {
    my ($self,
m{\Aapplication/json}o) {
        my $req = Plack::Request->new( $env );
        my $raw_body = $req->raw_body();
        return $self->app->($env) unless ($raw_body);
        my $json;
        {
    
     local $@;
          $json = eval { decode_json($raw_body) };
          if ($@) {
            die $@ if $self->{die_when_failed};
            $env->{'plack.middleware.jsonparser.error'} = $@;
    
PLON ( T/TO/TOKUHIROM/PLON-0.08.tar.gz, TOKUHIROM, 2014; MetaCPAN )
PLON/lib/PLON.pm ( view source; MetaCPAN )
the JSON.pm like interface.

=head1 WHY?

I need data dumper library supports JSON::XS/JSON::PP like interface.
I use JSON::XS really hard. Then, I want to use other serialization library with JSON::X
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
Amon2-Plugin-Web-ChromeLogger ( B/BA/BAYASHI/Amon2-Plugin-Web-ChromeLogger-0.03.tar.gz, BAYASHI, 2014; MetaCPAN )
Amon2-Plugin-Web-ChromeLogger/lib/Amon2/Plugin/Web/ChromeLogger.pm ( view source; MetaCPAN )
SPATCH' => sub {
        $_[0]->{chrome_logger} = Web::ChromeLogger->new(
            json_encoder => $conf->{json_encoder},
        );
    });

    $c->add_trigger('AFTER_DISPATCH' => sub {
        $
By default, this plugin is disabled under PLACK_ENV:production environment.

=head2 json_encoder

You can pass C<json_encoder> to L<WEB::ChromeLogger>.


=head1 REPOSITORY

Amon2::Plugin::Web::ChromeL
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
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
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.