Perl itself.
=head1 VERSION
Version 2.05
=head1 SEE ALSO
perl(1), perltie(1), perlfunc(1), L<Data::Dumper>, L<FreezeThaw>, L<Storable>, L<DBM::Deep>, L<MLDBM::Serializer::JSON>.
=cut
f>
Format used to output different text data, like rows, columns description etc.
Can be "xml", "json", "yaml", "html", "htmltable" or "native" for now, defaults
to "native".
Note a special case of
STRACT: PayPal Permissions
use strict;
use warnings;
use Carp qw/croak/;
use LWP::UserAgent;
use JSON;
use URI::Escape 'uri_escape';
use MIME::Base64 'encode_base64';
use Digest::HMAC_SHA1 'hmac_sha1
fault_header( 'X-PAYPAL-REQUEST-DATA-FORMAT', 'JSON' )
; ## JSON is more readable
$ua->default_header( 'X-PAYPAL-RESPONSE-DATA-FORMAT', 'JSON' );
$ua->default_header( 'X-PAYPAL-APPLIC
sions",
Content => encode_json( \%x ) );
return { error => [ { message => $res->status_line } ] }
unless $res->is_success;
my $data = decode_json( $res->content );
return $da
yy1',
oauth_token_secret => 'yyy2',
);
$ua->post( 'http://api.twitter.com/1/statuses/update.json', [
status => 'Posted this using LWP::Authen::OAuth!'
]);
=head1 DESCRIPTION
This module pro
Dwolla;
use 5.010001;
use strict;
use warnings;
our $VERSION = '0.05';
use LWP::UserAgent;
use JSON;
use URI::Escape;
use Digest::HMAC;
use IO::File;
use constant {
API_SERVER => 'https://ww
bject instance.
# url - Request URL.
# params - Request query parameters.
#
# Returns:
# JSON object or false (0) on failure
sub _get
{
my $self = shift;
my $url = shift;
my
est query parameters.
# include_token - Whether or not to include OAuth token.
#
# Returns:
# JSON object or false (0) on failure
sub _post
{
my $self = shift;
my $url =
a::Client::Base;
use strict;
use warnings;
use utf8;
use Carp qw(croak);
use LWP::UserAgent;
use JSON;
use HTTP::Request;
use URI;
use Class::Accessor::Lite (
new => 1,
rw => [qw(
ur
my $request = HTTP::Request->new("$method" => $url);
$request->content_type('application/json');
if ($method eq 'GET' || $method eq 'DELETE') {
my $uri = URI->new($url);
as_string);
} elsif ($method eq 'POST' || $method eq 'PUT') {
$request->content(JSON::encode_json $params);
} else {
croak "invalid http method: $method";
}
my $respon
S
use Gentoo::MetaEbuild::Spec::MiniSpec;
if( Gentoo::MetaEbuild::Spec::MiniSpec->check( json_decode( scalar slurp( $file ) ) ) ){
print "$file is metaspec compliant\n";
}
=head1
< C<::Spec::Base>|Gentoo::MetaEbuild::Spec::Base >>.
Everything outside that is governed by the .json files shipped in this distributions "Share" directory.
=head1 SCHEMA
$root = {
SCHE
use strict;
use warnings FATAL => 'all';
binmode STDOUT, ":encoding(UTF-8)";
use Carp;
require JSON;
use Params::Validate qw( :all );
use Readonly;
#use Smart::Comments;
=encoding utf-8
=head1 NA
nfig(
base_url => "https://api.smartling.com/v1/",
response_parser => { module => "JSON" },
sandbox_url => "https://sandbox-api.smartling.com/v1",
upload_url => "https:
ameters>
=item fileUri B<(required)>
Value that uniquely identifies the file.
=item B<Returns: JSON result from API>
=over 4
{"response":{"code":"SUCCESS","messages":[],"data":null,}}
=back
=b
package WebService::EchoNest;
use Moose;
use MooseX::StrictConstructor;
use JSON::XS::VersionOneAndTwo;
use LWP::UserAgent;
use URI::QueryParam;
our $VERSION = '0.007';
has 'api_root' => (
is
'json' );
return HTTP::Request->new( 'GET', $uri );
}
sub _make_request {
my ( $self, $request ) = @_;
my $ua = $self->ua;
my $response = $ua->request($request);
my $data = from_json(
return $self->ptable($tree) ? 1 : 0;
}
1;
package Unicorn::Manager::CLI::Proc;
use Moo;
use JSON;
use strict;
use warnings;
use autodie;
use 5.010;
has process_table => ( is => 'rw', );
sub BU
self = shift;
$self->process_table->refresh;
}
sub as_json {
my $self = shift;
my $json = JSON->new->utf8(1);
return $json->encode( { $self->as_hash } );
}
sub as_hash {
my $se
es the process table.
$uniman_proc->refresh;
=head2 as_json
Return process table as json.
my $json_text = $uniman_proc->as_json;
=head2 as_hash
Return process table as hash.
my %has
::Role;
use Carp qw{carp cluck croak confess};
use English qw{-no_match_vars};
use Readonly;
use JSON;
our $VERSION = 0.27;
Readonly::Scalar our $ATTRIBUTE_METACLASS_TO_SKIP => q[MooseX::Getopt::Me
irst level of references will be passed through, multi-dimensional data structures
should use the json serialisation option and deserialise it on object construction or script
running
my $command_l
s_as_json
returns all the built attributes that are not objects as a JSON string
my $sAttributesAsJSON = $class->attributes_as_json();
=head2 attributes_as_escaped_json
as attributes_as_json, ex
se warnings;
use autodie;
use 5.010;
use Unicorn::Manager::CLI;
use Unicorn::Manager::Types;
use JSON;
use Try::Tiny;
extends 'Net::Server::PreFork';
has listen => (
is => 'rw',
isa => Uni
rw' );
has user => ( is => 'rw' );
has group => ( is => 'rw' );
has cli => ( is => 'rw' );
has json => ( is => 'rw' );
sub BUILD {
my $self = shift;
$self->user('nobody') unless $s
unless $self->port;
$self->listen('localhost') unless $self->listen;
$self->json( JSON->new->utf8(1) );
$self->cli( Unicorn::Manager::CLI->new( username => $self->user ) ) unles
use strict;
use warnings;
use utf8;
use Carp;
use LWP::UserAgent;
use LWP::Protocol::https;
use JSON::XS;
use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC);
use SOAP::Lite; #+trace => 'debug';
=he
if ($response) {
my $content = $response->content;
my $json_xs = JSON::XS->new();
$result = $json_xs->decode($content)->{'access_token'};
}
unless (defined($result)
nager::Server;
use 5.010;
use feature 'say';
use strict;
use warnings;
use autodie;
use Moo;
use JSON;
use Try::Tiny;
use Unicorn::Manager::Server::PreFork;
has listen => (
is => 'rw',
isa
=head1 VERSION
Version 0.006009
=head1 SYNOPSIS
The Unicorn::Manager::Server module provides a json interface to query information about running unicorn processes and users.
Also some assumption a
= 1;
use Getopt::Long qw(:config pass_through);
use Unicorn::Manager::CLI;
use IO::Socket;
use JSON;
my $HELP = <<"END";
Synopsis
$0 [action] [options]
Actions
help
show this help
my $data = {
query => $query,
args => [@args],
};
my $json = JSON->new->utf8(1);
my $sock = IO::Socket::INET->new(
PeerAddr => $host || 'l
PeerPort => $port || 4242,
Proto => 'tcp',
);
my $json_string = $json->encode($data);
my $res;
if ( not $sock ) {
say "Apparently
se 5.000001;
use strict;
use warnings;
use Socket; # Leap communicates over WebSockets
use JSON; # ... in JSON
require Exporter;
our @ISA = qw(Exporter);
# Items to export into callers namespace by
too much data came in to process all at once - some got truncated...
} else {
$ret=from_json($ret);
}
}
return $ret;
} # Leap
1;
__END__
=head1 NAME
Device::Leap - Perl interf
This module requires these other modules and libraries:
Socket (already part of perl itself)
JSON
=head1 SEE ALSO
See the Leap Motion web site: https://leapmotion.com/ for links to
the develope
package Net::StackExchange2::V2::Common;
use 5.006;
use strict;
use Data::Dumper;
use JSON qw(decode_json);
use Carp;
use LWP::UserAgent;
use warnings FATAL => 'all';
use constant BASE_URL => "https:
return decode_json($response->decoded_content);
#StackExchange2 already returns error codes for
#incorrect params and requests
# if ($response->is_success) {
# return decode_json($response->d
be a hash inside an array
my $response = $ua->post($finalUrl, [%$queryStrHash]);
return decode_json($response->decoded_content);
}
sub no_params {
my $param = shift;
my $config = shift;
return s
ift;
my $message = shift;
my $data = shift;
my $json = JSON->new->utf8(1);
return $json->encode(
{
status => $status,
the encode->decode->encode
return $render->( 1, 'running unicorns', JSON::decode_json( $self->proc->as_json ) );
},
help => sub {
my $help = {
-2006 Ken Williams. 2010 Matt S Trout
=item L<version> Copyright 2004-2010 John Peacock
=item L<JSON::PP> Copyright 2007−2011 by Makamaka Hannyaharamitu
=item L<CPAN::Meta> Copyright (c) 2010 by
a description format to import/export a MIR from/to a
datastructures that fit modern formats like JSON or XML.
=head2 MARC::MIR::Tutorial
gives basic exemples of use of the MARC::MIR DSL described
ld has changed a so drastic way most of the
IT crowd, bred to modern serialization formats (YAML, JSON, XML) are clueless
when it comes to magnetic tapes friendly serializations. Librarians haven't go