package WWW::Moviepilot::Movie;
use warnings;
use strict;
use Carp;
use JSON::Any;
use URI;
use URI::Escape;
use WWW::Moviepilot::Person;
=head1 NAME
WWW::Moviepilot::Movie - Handle moviepilot.de
self->name;
my $uri = URI->new( $self->{m}->host . '/movies/' . uri_escape($movie) . '/casts.json' );
$uri->query_form( api_key => $self->{m}->api_key );
my $res = $self->{m}->ua->get( $
string );
if ( $res->is_error ) {
croak $res->status_line;
}
my $o = JSON::Any->from_json( $res->decoded_content );
foreach my $entry ( @{ $o->{movies_people} } ) {
my
on within a single database node or between database shards
=item * replication rules defined in JSON files
=item * synchronous replication within a single database through the use of automatically-
ion.json --shard-source=shard.json create-queue
% incline --rdbms=mysql --database=microblog --host=10.1.1.1 \
--user=root --password=XXXXXXXX --mode=shard \
--source=replication.json --
shard-source=shard.json create-trigger
The files, `replication.json' and `shard.json' should contain the definitions shown in the sections above.
=head2 RUNNING THE FORWARDER
To transfer modificati
ficial
* policies, either expressed or implied, of Cybozu Labs, Inc.
*
*/
#ifndef picojson_h
#define picojson_h
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include
: 4244) // conversion from int to char
#else
#define SNPRINTF snprintf
#endif
namespace picojson {
enum {
null_type,
boolean_type,
number_type,
string_type,
array_type,
rator>>(std::istream& is, picojson::value& x)
{
picojson::set_last_error(std::string());
std::string err = picojson::parse(x, is);
if (! err.empty()) {
picojson::set_last_error(err);
is.
package WWW::Moviepilot::Person;
use warnings;
use strict;
use Carp;
use JSON::Any;
use URI;
use URI::Escape;
use WWW::Moviepilot::Movie;
=head1 NAME
WWW::Moviepilot::Person - Handle moviepilot.d
>name;
my $uri = URI->new( $self->{m}->host . '/people/' . uri_escape($name) . '/filmography.json' );
$uri->query_form( api_key => $self->{m}->api_key );
my $res = $self->{m}->ua->get( $
string );
if ( $res->is_error ) {
croak $res->status_line;
}
my $o = JSON::Any->from_json( $res->decoded_content );
foreach my $entry ( @{ $o->{movies_people} } ) {
my
package Jamila;
use strict;
use warnings;
use utf8;
use CGI;
use JSON;
use LWP;
our $oCgi;
our $VERSION = '0.03';
#--------------------------------------------------------------------
# _disp: displa
return unless($@);
$sMsg = $@;
}
else
{
if($sPrm)
{
my $raData = from_json($sPrm);
my ($sMethod, @aPrm) = @$raData;
if(substr($sMethod, 0, 1) ne '_')
{
}
binmode STDOUT, ':utf8';
print "Content-Type: text/plain; charset=UTF-8\n\n" .
to_json({
error => $sMsg,
result => $oRes,
});
}
#--------
package Geo::Coder::Multimap;
use strict;
use warnings;
use Carp qw(croak);
use Encode ();
use JSON;
use LWP::UserAgent;
use URI;
use URI::Escape qw(uri_unescape);
our $VERSION = '0.01';
$VERSION =
output => 'json',
$country ? (countryCode => $country) : (),
);
my $res = $self->ua->get($uri);
return unless $res->is_success;
my $data = eval { from_json($res->decoded_
ate;
use Template::Constants qw( :debug );
use TAP::Formatter::HTML '0.08';
use TAP::Harness;
use JSON::Util;
use YAML::Syck ();
use XML::LibXML;
use HTML::Entities 'encode_entities';
our $VERSION =
'ttdir' => $self->ttdir,
'ttlibdir' => $self->ttlibdir,
'json' => JSON::Util->new(),
%{$more_tt_args},
},
$out_filename,
) || die
0;
foreach my $folder ($self->_all_folders) {
my $folder_summary = JSON::Util->decode([ $folder, 'summary.json' ]);
$all_passed += $folder_summary->{'all_passed'}->[0] || 0;
APNS;
use 5.006;
use strict;
use warnings FATAL => qw(all);
use WebService::UrbanAirship;
use JSON::XS ();
use HTTP::Request ();
use HTTP::Response ();
use HTTP::Headers ();
use LWP::UserAgent ();
the headers
my $headers = HTTP::Headers->new();
# all data needs to be JSON
$headers->content_type('application/json');
# set the authentication headers here
$headers->authorization_basic
//g;
my $json;
if (scalar keys %args) {
delete $args{alias} unless $args{alias};
delete $args{tags} unless $args{tags} && ref $args{tags};
$json = JSON::XS::encode_json(\%args);
documentation for response structure details.
=back
=head1 DEPENDENCIES
C<REST::Google> uses L<JSON::Any> for decoding Google AJAX Search API response and L<LWP> for search request sending.
=head1
s converted to JSON and then stored as Base64 string.
=cut
package NetSDS::Queue;
use 5.8.0;
use strict;
use warnings;
use Cache::Memcached::Fast;
use NetSDS::Util::Convert;
use JSON;
use base qw
my ($struct) = @_;
return conv_str_base64( encode_json($struct) );
}
sub _decode {
my ($string) = @_;
if ($string) {
return decode_json( conv_base64_str($string) );
} else {
return undef
rl (hash reference) representation of the JSON that is returned by
the Topsy API.
=item json
my $json = $result->json();
Returns the raw string of JSON that is returned by the Topsy API.
=item
utes
has perl => ( isa => 'HashRef', is => 'rw', default => sub { [ ] } );
has json => ( isa => 'Str', is => 'rw', default => '' );
has response => ( isa => 'HTTP
se strict;
use warnings;
use version; our $VERSION = qv('1.0.8');
use Carp qw/carp croak/;
use JSON::Any;
use HTTP::Request;
use LWP::UserAgent;
use URI;
require Class::Data::Inheritable;
requir
line
unless $response->is_success;
my $content = $response->content;
my $json = JSON::Any->new();
my $self = $json->decode($content);
return bless $self, $class;
}
sub responseData {
my $se
T;
use IO::Select;
use NetSDS::Util::String;
use NetSDS::Util::Convert;
use IPC::ShareLite;
use JSON;
use base qw(NetSDS::App);
use version; our $VERSION = "1.200";
# Default listen IP address an
shared memory clients list
# Structure: hash reference with system_id => 1
$shm->store( encode_json( {} ) );
$this->shm($shm);
} ## end sub _init_shm
sub set_signal_processors {
my ( $this, %
m queue server");
return 1;
}
# FIXME - provide incorrect data handling
my $mo = decode_json( conv_base64_str($line) );
use Data::Dumper;
print Dumper($mo);
# Check if know system_id
package JSONRPC::Transport::TCP;
use strict;
use warnings;
use base qw/Class::Accessor::Fast/;
__PACKAGE__->mk_accessors(qw/result error/);
use IO::Select;
use IO::Socket::INET;
use IO::Socket::UNIX
ire JSON::XS };
if ($@) {
$XS_AVAILABLE = 0;
require JSON;
}
}
=for stopwords Hostname Str tcp ip unix
=head1 NAME
JSONRPC::Transport::TCP - Client component for TCP JSONRPC
=head1 SYNOPSIS
use JSONRPC::Transport::TCP;
my $rpc = JSONRPC::Transport::TCP->new( host => '127.0.0.1', port => 3000 );
my $res = $rpc->call('echo', 'arg1', 'arg2' )
or d
****************************************
=item B<process()> - main JSON-RPC iteration
This is internal method that implements JSON-RPC call processing.
=cut
#--------------------------------------
Role::API {
use Carp qw/croak confess/;
use Moose;
use URI::Escape;
use JSON::Any qw/XS DWIW JSON/;
use Data::Dumper;
use LWP::UserAgent;
use Net::Topsy::Result;
our $V
quired => 0 );
has format => ( isa => 'Str', is => 'rw', required => 1, default => '.json' );
has base_url => ( isa => 'Str', is => 'ro', default => 'http://otter.topsy.com' );
erl = $self->_from_json( $response->content );
my $result = Net::Topsy::Result->new(
response => $response,
json => $response->
age TweetHook::API;
use strict;
use warnings;
use Carp;
use LWP::UserAgent;
use MIME::Base64;
use JSON;
use fields ( 'format', 'username', 'password', 'basicauth' );
use Data::Dumper;
our $apiroot =
: $class->new ( username, password );" ) unless $un && $pw;
my $self = {};
$self->{format} = 'json';
$self->{username} = $un;
$self->{password} = $pw;
$self->{basicauth} = 'Basic ' . MIME::B
( $apiroot . "/list." . $self->{format},
Authorization => $self->{basicauth} );
return from_json ( $resp->content ) if $resp->is_success;
return undef;
}
sub info {
my ( $self, @ids ) = @_;
package IPC::Message::Minivan;
use warnings;
use strict;
use 5.008;
use IPC::Messaging;
use JSON::XS;
use Time::HiRes;
use Regexp::Common;
use vars '$VERSION';
$VERSION = '0.01_08';
my $DEF_PORT = 6
p{host}, $p{port}, by_line => 1); };
$p{connected} = 0;
$p{queue} = [];
$p{chan} = {};
$p{json} = JSON::XS->new->ascii->allow_nonref;
my $me = bless \%p, $class;
$me->_poll;
$me;
}
sub subscri
_;
$me->_need_connect;
return 0 unless $me->{connected};
my $json = $me->{json}->encode($msg);
syswrite $me->{sock}, "put $chan $json\n";
return 1;
}
sub get
{
my ($me, @chan) = @_;
my $class
/usr/bin/env perl
use 5.8.0;
use strict;
use warnings;
use lib '../lib';
use Data::Dumper;
use JSON;
use NetSDS::Const::Message;
use NetSDS::Message;
use NetSDS::Message::SMS;
use NetSDS::Util::Str
->ud( 'Z' x 140 );
warn conv_str_hex( $msg->message_body );
#print Dumper($msg->reply);
my $j = JSON->new();
$j->pretty(1);
$j->utf8(1);
#$j->allow_blessed(1);
#$j->convert_blessed(1);
print "Lengt
Net::uTorrent;
use URI;
use URI::QueryParam;
use HTTP::Request::Common;
use LWP::UserAgent;
use JSON::XS;
use HTML::TreeBuilder;
use 5.010000;
use strict;
use warnings;
require Exporter;
our @ISA
:Request->new;
our $ua = LWP::UserAgent->new;
our $html_tree = HTML::TreeBuilder->new;
our $json = JSON::XS->new;
our $cid; #cache id
our $error;
sub new {
my ($class,%args) = @_;
my $self
%params;
my $json_text = api_query_result(@args);
my $decoded_json = $json->decode($json_text);
$cid = $decoded_json->{torrentc};
my @torrent = qw();
for (@{$decoded_json->{torrents}})