e JSON::XS qw(decode_json);
use Time::HiRes;
use Try::Tiny;
our $VERSION = '0.07';
my @file_types = ({
type => 'json',
re => qr{\.json$},
parser => sub {
my ($filename) = @_;
my $json;
$filename) =~ /(.*)/s; # untaint
try {
$json = decode_json(encode('UTF-8', $1));
} catch {
warning "couldn't parse json file ($filename): $_\n";
};
} catch {
warning "couldn't find file to parse ($filename): $_\n";
};
return $json;
},
});
my $dynamic_config;
register dynamic_config => sub {
my ($file_key) = @_;
initialize() unless $dynam
P;
# ABSTRACT: Perl interface to Taobao IP API
use strict;
use warnings;
use utf8;
use Carp;
use JSON::XS;
use LWP::UserAgent;
our $VERSION = '0.03'; # VERSION
binmode STDOUT, ':encoding(UTF8)';
s
nt->new;
my $res = $ua->get($full_url);
if ( $res->is_success )
{
my $info = JSON::XS->new->decode( $res->content );
if ( $info->{code} == 0 )
{
%$self
stack();
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST::State",
"interface":"class",
"inherits":"Class::Tiny::Object"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fre
LSX',
);
has template_extension => (
is => 'ro',
isa => 'Str',
default => 'json',
);
has catalyst_var => (
is => 'ro',
isa => 'Str',
default => 'c',
);
h
plate> object.
=head2 template_extension
The extension to use for template files. Defaults to C<json>.
=head2 catalyst_var
The variable name to use for the Catalyst context object in the template.
5.10.1;
use strict;
use warnings;
use Data::Dumper;
use Scalar::Util qw(looks_like_number);
use JSON;
use LWP::UserAgent;
use LWP::Protocol::https;
use RT::Extension::PushoverNotify::PushoverNoti
orting');
return 0;
}
$cfg->{'endpoint'} //= 'https://api.pushover.net/1/messages.json';
if (!defined($self->TemplateObj)) {
die("Template must be specified for invocations
$self->{'message'} );
if ($response->is_success) {
my(%r) = %{decode_json($response->decoded_content)};
if (defined($r{'receipt'})) {
#
env_true('RELEASE_TESTING') ) {
require CPAN::Meta;
my $meta = CPAN::Meta->load_file('META.json');
my $prereqs = $meta->effective_prereqs;
my $reqs = $prereqs->requirements_for( 'develop
e types.
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST::Node",
"interface":"class",
"inherits":"Class::Tiny::Object"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fred
ncy::AST::Node of some kind
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST",
"interface":"single_class"
}
=end MetaPOD::JSON
=head1 SUPPORTED FEATURES
=head2 C<use?>
ent::Socket;
use Getopt::Long;
use JSON::PP;
our $VERSION = "0.03";
$| = 1;
$AnyEvent::Log::FILTER->level("info");
our %Config = (
config_file => "rhttp.json",
cert_file => "",
key_fil
r exit;
if ($Config{add}) {
my $json_config = config($Config{config_file});
my $add = delete($Config{add});
%Config = %{$json_config} if defined $json_config;
if ($add =~ m#^vhost:(
e}, JSON::PP->new->ascii->pretty->encode(\%Config));
exit;
}
if ($Config{del}) {
my $json_config = config($Config{config_file});
my $del = delete($Config{del});
%Config = %{$json_co
begin MetaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST::Node::Dependency",
"interface":"class",
"inherits":"Gentoo::Dependency::AST::Node"
}
=end MetaPOD::JSON
=head1 AUTHOR
se TBX::XCS;
use TBX::XCS::JSON qw(xcs_from_json);
use File::Slurp;
my $rng;
if($ARGV[0] eq '--json'){
my $json = read_file($ARGV[1]);
my $xcs = xcs_from_json($json);
$rng = generate_rng(
nst the XCS constraints and the core TBX structure.
Passing C<--json> as the first argument will cause the script to expect
an XCS JSON file instead of an XML file.
=head1 AUTHOR
Nathan Glenn <garf
rnings FATAL => 'all';
use Time::HiRes qw(gettimeofday);
use Math::Random::Secure qw(irand);
use JSON;
use MIME::Base64 qw(decode_base64 decode_base64url encode_base64url);
use Crypt::Mac::HMAC qw( h
2::Test - map = \n";
p $map;
my $json = encode_json $map;
print "Net::PT2::Test - json = \n";
p $json;
my $b64 = encode_base64url $json;
print "Net::PT2::Test - base64 url =
st - hmac = \n";
p $hmac;
my $json2 = decode_base64url $b64;
print "Net:PT2::Test - json2 = \n";
p $json2;
my $map2 = decode_json $json2;
print "Net:PT2::Test - map2 = \n
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST::Node::TopLevel",
"interface":"class",
"inherits":"Gentoo::Dependency::AST::Node"
}
=end MetaPOD::JSON
=head1 AUTHOR
begin MetaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST::Node::Group::Use",
"interface":"class",
"inherits":"Gentoo::Dependency::AST::Node"
}
=end MetaPOD::JSON
=head1 AUTHOR
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST::Node::Group::Or",
"interface":"class",
"inherits":"Gentoo::Dependency::AST::Node"
}
=end MetaPOD::JSON
=head1 AUTHOR
begin MetaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST::Node::Group::And",
"interface":"class",
"inherits":"Gentoo::Dependency::AST::Node"
}
=end MetaPOD::JSON
=head1 AUTHOR
ons::List';
with 'Paymill::REST::Operations::Create';
use LWP::UserAgent;
use HTTP::Request;
use JSON::XS;
has type => (is => 'ro', required => 1, isa => 'Str');
has debug => (is => 'rw', requi
ader(Accept => 'application/json');
$req->content_type('application/json');
$req->uri($uri);
if ($query) {
$self->_debug("Adding params: " . encode_json($query));
$req->ur
ent: '" . $res->content . "'");
if ($res->content !~ /^\s*$/) {
return decode_json($res->content);
} else {
return undef;
}
}
}
=head2 _debug
Para
gent(__PACKAGE__ . ' ' . $WebService::PlayaEvents::VERSION);
$self->content_type('application/json');
$self->base_url('http://playaevents.burningman.com/api/0.2/' . $self->year);
return $
etaPOD::JSON v1.1.0
{
"namespace":"Gentoo::Dependency::AST::Node::Group::NotUse",
"interface":"class",
"inherits":"Gentoo::Dependency::AST::Node::Group::Use"
}
=end MetaPOD::JSON
=head
JSON::XS;
use Apache::Hendrix::Route;
use Moose;
use MooseX::FollowPBP;
use MooseX::ClassAttribute;
use Moose::Exporter;
use Template;
use version; our $VERSION = qv(0.3.0);
use DDP;
class_has 'json
' => (
isa => 'Object', is => 'rw',
default => sub { JSON::XS->new()->allow_blessed(1)->convert_blessed(1) },
);
class_has 'handlers' => ( isa => 'HashRef[ArrayRef]', is => 'rw', d
et_method->( \%params, $r, $route );
if ( ref $result ) {
return make_json( $r, $result );
}
return $result;
}
} ## end ROUTE: for my $r