ckage Net::Hadoop::HuahinManager;
use strict;
use warnings;
use Carp;
use URI::Escape qw//;
use JSON::XS qw//;
use Furl;
our $VERSION = "0.03";
sub new {
my ($this, %opts) = @_;
croak "Hu
if ($code == 200) {
if ($content_type =~ m!^application/json! and length($body) > 0) {
return JSON::XS::decode_json($body);
}
return 1;
}
# error
carp
est::MD5 qw(md5_hex);
use File::Basename;
use File::Slurp qw(read_file write_file);
use JSON qw(to_json from_json);
sub max_timestamp(@) { max map { (stat $_)[9] || 0 } @_ } # Obviously 9 is mtime
#
"couldn't cache $script->{path}";
write_file($config->{cache_file}, { atomic => 1 }, to_json($config->{cache}, {pretty => 1})) or warn "Couldn't save cache control file";
}
}
}, $class;
$config->{cache_file} ||= "$config->{cache_dir}/cache.json";
$config->{cache} = from_json( read_file($config->{cache_file}) ) if -f $config->{cache_file};
my $cache_
package WebService::FileCloud;
use strict;
use warnings;
use JSON;
use LWP::UserAgent;
use HTTP::Request::Common qw( $DYNAMIC_FILE_UPLOAD );
our $VERSION = '0.3';
use constant BASE_URI => 'http://
@_};
$self->{'ua'} = LWP::UserAgent->new( timeout => $self->{'timeout'} );
$self->{'json'} = JSON->new();
bless( $self, $class );
return $self;
}
sub fetch_apikey {
my ( $sel
$self->{'error'} = $response->status_line();
return;
}
return $self->{'json'}->decode( $response->decoded_content() );
}
sub fetch_account_details {
my ( $self, %args
m`HTML::HTML5::Parser HTML-HTML5-Parser 0.200 cpan:TOBYINK`
# Trailing "::" can disambiguate
`JSON::`
Packages:
# Always need the disambiguation letter to avoid confusion
# with modules
p`HTM
se CGI;
use Text::Balanced qw(extract_bracketed extract_quotelike extract_codeblock);
use JSON::PP;
use XML::LibXML;
use Hash::Util qw(lock_ref_keys_plus lock_keys);
use MIME::Base
_ } $q->param($n) } $q->param ],
'X-Requested-With' => 'XMLHttpRequest');
my $d = decode_json $self->{mech}->content;
lock_ref_keys_plus($d, qw(code endcause calculated_balance));
$
vironment or configuration files.
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Package::Debug",
"interface":"exporter"
}
=end MetaPOD::JSON
=head1 EXPECTED FEATURES
=over 4
=item * Deferr
ct;
use utf8;
use Carp qw[carp croak];
use Data::UUID;
use Digest::MD5 qw[md5_hex];
use DBI;
use JSON qw[];
use overload qw[];
use RDF::Trine qw[statement blank literal];
use RDF::Trine::Namespace qw
my $rv;
unless ($options{no_json})
{
my $json = $self->to_json(canonical=>1, pretty=>1);
$json =~ s/^/# /gm;
$json = "# MAPPING\n#\n${json}\n";
$rv .= $json;
}
$rv .= $self->SUPER::pro
) },
};
}
*TO_JSON = \&to_hashref;
sub to_json
{
my ($self, %opts) = (exists $_[1] and ref $_[1] eq 'HASH') ? ($_[0], %{ $_[1] }) : @_;
$opts{convert_blessed} = 1;
JSON::to_json($self, {%opts})
package WWW::Github::Files;
use strict;
use warnings;
use LWP::UserAgent;
use JSON qw{decode_json};
use Carp;
our $VERSION = 0.13;
sub new {
my ($class, %options) = @_;
die "Please pass a a
message(). ", ".$res->content;
}
}
my $content = $res->content;
return decode_json($content);
}
package WWW::Github::Files::File;
use MIME::Base64 qw{decode_base64};
sub is_file
ug_verbatim>|/debug_verbatim >>
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Package::Debug::Object",
"interface":"class"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentfredric@gmail
:Eventful->new(app_key => $app_key, flavor => 'yaml');
Valid flavors are C<rest>, C<yaml>, and C<json>.
=cut
sub new
{
my $thing = shift;
my $class = ref($thing) || $thing;
my %params = @_
URLSafe;
use Crypt::OpenSSL::X509;
use Crypt::OpenSSL::RSA;
use Date::Parse;
use LWP::Simple;
use JSON;
=head1 NAME
GoogleIDToken::Validator - allows you to verify on server side Google Access Token
$signature = urlsafe_b64decode($signature);
$env = decode_json(urlsafe_b64decode($env));
$payload = decode_json(urlsafe_b64decode($payload));
if(!exists $self->{certs}-
he file($self->{certs_cache_file}): $!";
my $json_certs = '';
while(<$fh>) { $json_certs .= $_ }
if($json_certs) {
$self->parse_certs($json_certs);
} else {
$self->{certs} = undef;
STRACT: Authorize with Box.com
use strict;
use warnings;
use Carp::Assert;
use HTTP::Tiny;
use JSON;
use Moo;
use Types::Standard qw(Str InstanceOf);
use URI;
our $VERSION = 0.03;
use constant BO
Tiny"], lazy => 1, default => sub { HTTP::Tiny->new } );
has jsonp => ( is => 'lazy', isa => InstanceOf["JSON"] );
sub _build_jsonp { JSON->new->allow_nonref }
sub authorization_uri {
my ($self,
},
);
if ( $result->{success} and $result->{content} ) {
my $data = $self->jsonp->decode( $result->{content} );
return wantarray ?
( $data->{access_token},
d2 C<_boolean_type>
=begin MetaPOD::JSON v1.1.0
{
"namespace":"String::Sections",
"interface":"class",
"inherits":"Moo::Object"
}
=end MetaPOD::JSON
=head1 DEVELOPMENT
This code is s
section('bar');
=begin MetaPOD::JSON v1.1.0
{
"namespace":"String::Sections::Result",
"interface":"class",
"inherits":"Moo::Object"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <k
Graph::VERSION = '1.0.1';
}
# ABSTRACT: create JSON with graph data for Status Board iPad App
use strict;
use warnings;
use utf8;
use Carp;
use JSON;
use File::Slurp;
use Clone qw(clone);
my $tru
sub get_json {
my ($self) = @_;
my $json = to_json(
$self->__get_data()
);
return $json;
}
sub get_pretty_json {
my ($self) = @_;
my $pretty_json = to_json(
);
return $pretty_json;
}
sub write_json {
my ($self, $file_name) = @_;
write_file(
$file_name,
{binmode => ':utf8'},
$self->get_json(),
);
return $f
rl/i) {
$writer = "Data::Stag::PerlWriter";
}
elsif ($fmt =~ /json/i) {
$writer = "Data::Stag::JSONWriter";
}
elsif ($fmt =~ /dtd/i) {
$writer = "Data::Stag::DT
_json = sub { my $id = shift; ...; return $json; };
my $get_xml = sub { my $id = shift; ...; return $xml; };
my $get_txt = sub { my $id = shift; ...; return $txt; };
unAPI
json
=> wrAPI( $get_json => 'application/json' ),
xml => wrAPI( $get_xml => 'application/xml' ),
txt => wrAPI( $get_txt => 'text/plain', docs => 'http://example.com' );
The function C<
s resource in JSON
my $app2 = sub { ... }; # PSGI app that serves resource in XML
my $app3 = sub { ... }; # PSGI app that serves resource in plain text
unAPI
json => [ $app1 =
package Data::Stag::JSONWriter;
=head1 NAME
Data::Stag::JSONWriter - writes stag events into JSON files
=head1 SYNOPSIS
=cut
=head1 DESCRIPTION
=head1 PUBLIC METHODS -
=cut
use strict;
use
se JSON;
use vars qw($VERSION);
$VERSION="0.14";
sub fmtstr {
return 'json';
}
sub end_stag {
my $self = shift;
my $stag = shift;
my $obj = $self->stag2json($stag);
my $json =
JSON->new->allow_nonref;
my $json_text = $json->pretty->encode( $obj );
$self->addtext($json_text);
return;
}
sub stag2json {
my $self = shift;
my $stag = shift;
my $obj = {};
Moo;
use Types::Standard qw(InstanceOf Dict Str);
use HTTP::Tiny;
use HTTP::Tiny::Multipart;
use JSON;
use WebService::Box::Types::Library qw(OptionalStr);
our $VERSION = 0.01;
has session =>
error => (is => 'rwp', isa => OptionalStr );
has jsonp => (is => 'ro', isa => InstanceOf["JSON"], lazy => 1, builder => sub { JSON->new->allow_nonref } );
has auth_header => (
is
$self->_set_error( $result->{content} );
return;
}
my %data = %{ $self->jsonp->decode( $result->{content} || "{}" ) || {} };
return %data;
}
sub _files_upload {
my (
:jsonschema;
&usage if @ARGV < 2;
my $schema_file = shift;
my $app = App::jsonschema->new( schema_file => $schema_file );
$app->validate(@ARGV);
sub usage {
print STDERR "Usage: $0 schema.json
file1.json [file2.json ...]\n";
exit 1;
}
# ABSTRACT: Validate JSON files using JSON Schema
# PODNAME: jsonschema.pl
__END__
=pod
=encoding utf-8
=head1 NAME
jsonschema.pl - Validate JSON file
s using JSON Schema
=head1 VERSION
version 0.03
=head1 SYNOPSIS
jsonschema.pl schema.json file1.json [file2.json ...]
=head1 SEE ALSO
L<App::jsonschema>, L<JSON>, L<JSON::Schema>
=head1 AUTHOR