pe qw(uri_escape);
use LWP::UserAgent;
use Carp qw(croak);
use Digest::SHA qw(sha256_base64);
use JSON;
=head1 NAME
WebService::Ooyala - Perl interface to Ooyala's API, currently only read
operation
path, $body, $params) = @_;
my $path = "/" . $self->{api_version} . "/" . $relative_path;
my $json_body = {};
my $url =
$self->build_path_with_authentication_params($http_method, $path,
$par
ailed to GET $full_url - " . $resp->status_line;
}
if ($resp->is_success) {
return decode_json($resp->decoded_content);
}
} else {
croak
"Trying to call a method that is not implemente
aygun> method may be called to retreive the structure in a form
that can be converted directly to JSON.
=head1 INTERFACE
=cut
use Data::GUID 'guid_string';
use Mouse::Util::TypeConstraints;
subt
aygun> method may be called to retreive the structure in a form
that can be converted directly to JSON.
=head1 INTERFACE
=cut
use Filesys::DfPortable;
use Sys::Info;
use Sys::Info::OS;
use POSIX (
eclare("v0.1.2");
use 5.010;
use Carp;
use failures qw/vero::api/;
use Mojo::UserAgent;
use Mojo::JSON 'j';
use Moo;
use namespace::autoclean;
has ua => (
is => 'rw',
builder => 1,
);
su
$email;
my $tx = $self->ua->post(
'https://api.getvero.com/api/v2/users/track.json',
json => {
auth_token => $self->token,
($id ? (id => $id) : ()
pi->throw("Vero API returned error: code $code, error $err, data " . j($tx->res->json));
}
return $tx->res->json;
}
sub track_event {
my ($self, $event_name, %info) = @_;
my $id =
8
This is Perl module B<Test::JSON::More>.
=begin html
<a href="http://travis-ci.org/bayashi/Test-JSON-More"><img src="https://secure.travis-ci.org/bayashi/Test-JSON-More.png?_t=1461806674"/></a>
s.io/r/bayashi/Test-JSON-More"><img src="https://coveralls.io/repos/bayashi/Test-JSON-More/badge.png?_t=1461806674&branch=master"/></a>
=end html
=head1 INSTALLATION
Test::JSON::More installation
Test::JSON::More
Download it, unpack it, then build it as per the usual:
% perl Makefile.PL
% make && make test
Then install it:
% make install
=head1 DOCUMENTATION
Test::JSON::More
vice::Pinterest::Pager;
use HTTP::Request;
use HTTP::Request::Common ();
use LWP::UserAgent;
use JSON::XS;
use Carp qw(croak);
use namespace::autoclean;
has app_id => (
is => 'ro',
p
}
# Decode JSON content
my $r;
if ( $res && $res->content_type eq 'application/json' ) {
my $json = $res->decoded_content;
$r = eval { decode_json($json) };
if (
my $err = $@ ) {
$r = { _error => 'bad_json', _message => $err, json => $json };
}
}
$r //= { _error => 'not_json', _content_type => $res->content_type };
$r->{_http_s
es
use base qw(Labyrinth::Plugin::Base);
use Labyrinth::Support;
use Labyrinth::Variables;
use JSON;
use WWW::Mechanize;
#--------------------------------------------------------------------------
;
return if($@ || !$mech->success() || !$mech->content());
my $json = $mech->content();
my $data = decode_json($json);
return unless($data);
$tvars{sponsor} = {
title =>
ID::PayPal::LIPP;
use strict;
use 5.008_005;
use warnings;
our $VERSION = '0.02';
use Carp;
use JSON;
use URI;
use URI::QueryParam;
use HTTP::Request::Common;
use Convert::Base64;
use LWP::UserAgent
data_json = $self->_post(
$self->paypal_auth_token_service_endpoint,
$post_data,
{ Authorization => "Basic $encoded_header" }
);
my $data_hash = decode_json($data_json);
data_json = $self->_post(
$self->paypal_auth_token_service_endpoint,
$post_data,
{ Authorization => "Basic $encoded_header" }
);
my $data_hash = decode_json($data_json);
rieves a specific report.
=head1 SYNOPSIS
# default options
my %options = (
as_json => 0, # the default
as_hash => 0, # the defau
:Fact, as a CPAN::Testers::Report object.
If you wish to manipulate this differently, use the as_json or as_hash to
return more simplified forms.
# get by id
my $result = $query->report( re
turn as JSON
my $result = $query->report( report => 40000000, as_json => 1 );
# force return as a hash
my $result = $query->report( report => 40000000, as_hash => 1 );
The as_json and as
} @succ;
}
## Utility methods
sub _stringify {
my $self = shift;
return $self->id;
}
sub TO_JSON {
my $self = shift;
return $self->text;
}
sub throw {
Text::Tradition::Error->throw(
'iden
code_utf8 );
use File::Temp;
use File::Which;
use Graph;
use IPC::Run qw( run binary );
use JSON qw/ to_json /;
use Text::CSV;
use Text::Tradition::Collation::Data;
use Text::Tradition::Collation::Rea
);
}
}
}
=head2 as_adjacency_list
Returns a JSON structure that represents the collation sequence graph.
=begin testing
use JSON qw/ from_json /;
use Text::Tradition;
my $t = Text::Tradition-
tical' } );
# Create an adjacency list of the whole thing; test the output.
my $adj_whole = from_json( $c->as_adjacency_list() );
is( scalar @$adj_whole, scalar $c->readings(),
"Same number of node
File::Path;
use File::Slurp;
use Getopt::ArgvFile default=>1;
use Getopt::Long;
use IO::File;
use JSON;
use LWP::UserAgent;
use Math::Random::MT;
use Metabase::Resource;
use MIME::Base64;
use MIME::Qu
mode => 'daily',
mailrc => 'data/01mailrc.txt'
);
my $sponsorfile = 'sponsors.json';
my (%AUTHORS,%PREFS,@SPONSORS,$MT,$IHEART,$serializer);
my %MODES = (
daily => { type =
rializer->new(
detect_compression => 1,
detect_sereal => 1,
detect_json => 1,
);
return $self;
}
sub check_reports {
my $self = shift;
my $mode
package Text::Tradition::Witness;
use vars qw( %tags );
use JSON;
use Moose;
use Text::Tradition::Datatypes;
use Text::TEI::Markup qw( word_tag_wrap );
use TryCatch;
=head1 NAME
Text::Tradition::Wi
d.
=item * sourcetype - What sort of witness data this is. Options are
'xmldesc', 'plaintext', 'json', or 'collation' (the last should only be
used by Collation parsers.)
=item * file
=item * stri
e JSON witnesses via object
open( JSIN, 't/data/witnesses/testwit.json' ) or die "Could not open JSON test input";
binmode( JSIN, ':encoding(UTF-8)' );
my @lines = <JSIN>;
close JSIN;
$trad->add_json_
to GitHub after release
use strict;
use warnings;
our $VERSION = '0.002'; # VERSION
use JSON qw(encode_json);
use Moose;
use Try::Tiny;
use Git::Wrapper;
use File::Basename;
use File::Slurp qw(read
y $response = HTTP::Tiny->new->request('POST', $url, {
content => (ref($payload) ? encode_json($payload) : $payload),
headers => $headers,
});
$self->_last_status($response->{
urceType',
as 'Str',
where { $_ =~ /^(xmldesc|plaintext|json|collation)$/ },
message { 'Source type must be one of xmldesc, plaintext, json, collation' };
subtype 'Sigil',
as 'Str',
where { $_
age eq $match; #otherwise, brain-dead comparison
}
if($ref_message eq 'JSON::PP::Boolean' and $ref_match eq 'JSON::PP::Boolean') {
return "$message" eq "$match";
}
if($ref_mess
package Text::Tradition;
use JSON qw / from_json /;
use Module::Load;
use Moose;
use Moose::Util qw/ does_role apply_all_roles /;
use Safe::Isa;
use Text::Tradition::Collation;
use Text::Tradition::E
CollateX
=item * CTE - a TEI XML format produced by Classical Text Editor
=item * JSON - an alignment table in JSON format, as produced by CollateX and
other tools
=item * TEI - a TEI parallel seg
priate parser on the given data
my @format_standalone = qw/ Self CollateText CollateX CTE JSON TEI Tabular /;
my @format_basetext = qw/ KUL /;
my $use_base;
my $format
ss=\"path\">$path</span>
</div>
<ul class=\"format\">
<li><a href=\"?format=application/json\">json</a></li>
<li><a href=\"?format=text/yaml\">yaml</a></li>
<li><a href=\"?format=text/pla
o;
with qw/
Google::Client::Role::Token
Google::Client::Role::FurlAgent
/;
use Carp;
use Cpanel::JSON::XS;
has base_url => (
is => 'ro',
default => 'https://www.googleapis.com/drive/v3/files
ovided") unless ($id);
$content = $content ? encode_json($content) : undef;
my $url = $self->_url("/$id/copy", $params);
my $json = $self->_request(
method => 'POST',
url
=> $url,
content => $content
);
return $json;
}
sub create {
my ($self, $params, $content) = @_;
unless ( $content && %$content ) {
confess("No content provided to cr
package Cltest::ChangeInfo;
use 5.018;
use warnings;
use JSON::PP;
use Cltest::PatchsetBuildResult;
use Cltest::Utils;
# return hash
sub get_change_detail
{
my $ua = Cltest::Utils::get_ua();
my $c
$resp = $ua->get($url);
if ($resp->is_success ){
$_ = $resp->decoded_content;
return decode_json( substr( $_, index ($_, "\n") + 1) );
}
else {
die "get_change_detail : url = $url ",$resp->s