ER_SERVICE => 'sitemaps',
YOUTUBE_SERVICE => 'youtube',
#FORMATS
JSON => 'json',
JSONC => 'jsonc',
ATOM => 'atom',
RSS => 'rss',
#HTTP STA
EST UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT GONE INTERNAL_SERVER_ERROR);
my @format = qw(JSON JSONC ATOM RSS);
my @namespace = qw(ATOM_NAMESPACE OPENSEARCH_NAMESPACE GDATA_NAMESPACE GEORSS_NA
ice=> BOOK_SERVICE,....);
my $base = new WebService::GData::Base();
$base->query()->alt(JSON);
#if not imported
$base->add_namespace(WebService::GData::Constants::MEDIA_NAMESPACE)
'Test::Bot';
with 'Test::Bot::Source';
use AnyEvent;
use Twiggy::Server;
use Plack::Request;
use JSON;
use DateTime::Format::ISO8601;
use Test::Bot::Commit;
use Carp qw/croak/;
has '_http_server' =>
got a set of commits
sub parse_payload {
my ($self, $payload) = @_;
my $parsed = decode_json($payload) or return;
my @commits;
foreach my $commit_info (@{ $parsed->{commits} || []})
Object::Event );
use AnyEvent::Handle;
use IO::Socket::Multicast;
use Padre::Swarm::Message;
use JSON;
our $VERSION = '0.2';
=pod
=head1 NAME
Padre::Plugin::Swarm::Transport::Local - Multicast swa
);
}
$self->unreg_me;
}
sub _marshal {
JSON->new
->allow_blessed
->convert_blessed
->utf8
->filter_json_object(\&synthetic_class );
}
sub synthetic_class
$this->{namespaces} = {};
if ( ref( $args[0] ) eq 'HASH' ) {
#accept a text tag but json feed uses $t tag so adapt
#for compatibility
if ( $args[0]->{'$t'} ) {
bService::GData::Node::Category(scheme=>'author','yt:term'=>'Author');
#or coming from a json feed:
my $category = new WebService::GData::Node::Category({scheme=>'author','yt$term'=>'Auth
y the representation of one xml tag. Feed and Feed subclasses are the representation of an entire JSON response
or offers a subset.
See also:
=over
=item * L<WebService::GData::Node::AbstractEntity
$entry, request()->upload('attachments') );
if ( request()->header('Accept') =~ /json/ ) {
my $ret = {
status => 'created',
status(201);
content_type('application/json');
return to_json($ret);
}
if ( $type eq 'comment' ) {
}
}
else {
if ( request()->header('Accept') =~ /json/ ) {
my $ret = {
status => 'error',
nterface
=head1 Synopsis
use PGXN::API::Searcher;
use JSON;
my $search = PGXN::API::Searcher->new('/path/to/api/root');
encode_json $search->search( query => $query, in => 'docs' );
=head1
ks for distributing any kind of release distributions and for
providing a lightweight static file JSON REST API.
This module encapsulates the PGXN API search functionality. The indexes are
created by
inst the appropriate index, and returns the results as a hash suitable
for serializing to L<JSON|http://json.org/> in response to a request.
To use this module, one must have a path to the API server
bbitMQ management plugin
use Moo;
use Carp qw(croak);
use HTTP::Headers;
use HTTP::Request;
use JSON::Any;
use LWP::UserAgent;
use Net::RabbitMQ::Management::API::Result;
use URI;
has 'ua' => (
( $self, $uri ) = @_;
$self->{url} = URI->new("$uri");
},
);
has '_json' => (
builder => '_build__json',
is => 'ro',
lazy => 1,
);
sub request {
my ( $self, %ar
$self->username, $self->password );
if ($data) {
my $json = $self->_json->encode($data);
$request->content($json);
}
$request->header( 'Content-Length' => length $reques
PI::Result::VERSION = '0.01';
}
# ABSTRACT: RabbitMQ Management API result object
use Moo;
use JSON::Any;
has 'response' => (
handles => {
code => 'code',
raw_content =
zy => 1,
);
has '_json' => (
builder => '_build__json',
is => 'ro',
isa => sub { die 'must be a JSON::Any, but is ' . ref $_[0] unless ref $_[0] eq 'JSON::Any' },
lazy
1,
);
sub _build__json {
my ($self) = @_;
return JSON::Any->new;
}
sub _build_content {
my ($self) = @_;
if ( $self->raw_content ) {
return $self->_json->decode( $self->raw
IRA::Client::REST::VERSION = '0.06';
}
use Moose;
# ABSTRACT: JIRA REST Client
use JSON qw(decode_json encode_json);
use Net::HTTP::Spore;
has '_client' => (
is => 'rw',
lazy => 1,
def
url => $self->url,
trace => $self->debug,
);
$client->enable('Format::JSON');
$client->enable('Auth::Basic', username => $self->username, password => $self->passwor
p://docs.atlassian.com/jira/REST/latest/>.
It is a thin wrapper, returning decoded version of the JSON without any munging
or mangling.
=head1 HEADS UP
This module is under development and some of t
a spout tuple message.
:param tup: the tuple to send to Storm. Should contain only
JSON-serializable data.
:type tup: list
:param tup_id: the ID for the tuple. Leave this blank for an
search";
}
$args{format} ||= 'json';
$args{count} = 10;
die 'only json format supported, xml patches welcome'
unless $args{format} eq 'json';
$args{filter} = '-porn';
warnings;
use v5.10;
use IO::Handle qw(autoflush);
use IO::File;
use Log::Log4perl qw(:easy);
use JSON::XS;
use Data::Dumper;
use IO::Storm::Tuple;
# Setup Moo for object-oriented niceties
use Moo;
u
'max_blank_msgs' => (
is => 'rw',
default => 500
);
has '_json' => (
is => 'rw',
default => sub { JSON::XS->new->allow_blessed->convert_blessed }
);
has '_topology_name' =>
}
}
chomp($line);
push( @messages, $line );
}
return $self->_json->decode( join( "\n", @messages ) );
}
sub read_task_ids {
my $self = shift;
if ( scalar
ents;
=head1 NAME
Config::Merge::Dynamic - load a configuration directory tree containing
YAML, JSON, XML, Perl, INI or Config::General files AND alter it in runtime.
=head1 VERSION
Version 0.14.1
m::VERSION = '0.01';
}
use Moose;
use IO::Handle qw(autoflush);
use IO::File;
use JSON::XS qw(decode_json encode_json);
use Log::Log4perl;
use IO::Storm::Tuple;
# ABSTRACT: Perl support for Twitter'
($self) = @_;
return decode_json($self->read_string_message);
}
sub send_message_to_parent {
my ($self, $href) = @_;
$self->send_to_parent(encode_json($href));
}
sub send_to_parent
Read a message from the ShellBolt and decode it from JSON.
=head2 send_message_to_parent
Sent a message to the ShellBolt, encoding it as JSON.
=head2 send_to_parent
Send a message to the ShellBo
roducer;
use strict;
use warnings;
use base qw/MyApp::ControllerBase::REST/;
use JSON::XS;
__PACKAGE__->config(
action => { setup => {
ject}->get_columns;
}
}
1;
__compclass__
package [% class %];
use strict;
use warnings;
use JSON::XS;
use parent qw/[% app %]::ControllerBase::REST/;
__PACKAGE__->config(
# Define parent c
"github/gollum",
mode => "gfm",
},
);
# Note that response is NOT in JSON, so ->content will die
my $html = $response->raw_content;
=head1 AUTHOR
Johannes Plunien <p
package Geo::Coder::ArcGIS;
use strict;
use warnings;
use Carp qw(croak);
use JSON;
use LWP::UserAgent;
use URI;
our $VERSION = '0.01';
$VERSION = eval $VERSION;
sub new {
my ($class, %params)
if $self->{https};
$uri->query_form(
SingleLine => $location,
f => 'json',
outFields => '*',
);
my $res = $self->{response} = $self->ua->get(
$u
return unless $res->is_success;
# Change the content type of the response from 'application/json' so
# HTTP::Message will decode the character encoding.
$res->content_type('text/plain');
use Data::Encoder;
my $encoder = Data::Encoder->load('JSON');
my $json = $encoder->encode(['foo']);
my $data = $encoder->decode($json);
=head1 DESCRIPTION
Data::Encoder is generic interface
sary, and create new instance of using the given arguments.
my $encoder = Data::Encoder->load('JSON', +{ utf8 => 1, pretty => 1 });
my $encoder = Data::Encoder->load('+My::Encoder', +{ option
$access_token = $token_object->valid_access_token();
=cut
use Moose::Util::TypeConstraints;
use JSON;
use Carp;
use URI::Escape;
use YAML qw/LoadFile DumpFile Dump/;
use MooseX::Types::URI qw(Uri Fi
%s/%s", $response->code, $response->title );
}
my $obj = eval{local $SIG{__DIE__}; decode_json($response->decoded_content)} || {};
if( not $obj->{access_token} ){
croak( "No access
ror_uri state/) {
$hash{$_} = $self->{$_} if defined $self->{$_};
}
return encode_json(\%hash);
}
=head2 sync_with_store
Sync with the store file.
First reads out the current data fr
t::VERSION = '0.01011';
}
# ABSTRACT: Github v3 result object
use Moo;
use Array::Iterator;
use JSON::Any;
use URI;
has 'auto_pagination' => (
default => 0,
is => 'rw',
);
has 'cont
zy => 1,
);
has '_json' => (
builder => '_build__json',
is => 'ro',
isa => sub { die 'must be a JSON::Any, but is ' . ref $_[0] unless ref $_[0] eq 'JSON::Any' },
lazy
sub _build_content {
my ($self) = @_;
if ( $self->raw_content ) {
return $self->_json->decode( $self->raw_content );
}
return {};
}
sub _build_first_page_uri {
return shi