},
],
Meta => {
QuickCalls => {
Type => 'JSON',
},
}
);
}
=head1 AUTHOR
Best Practical Solutions, LLC E<lt>modules@be
st->new(POST => 'https://localhost/cgi-bin/info.pl');
$req->header('content-type' => 'application/json');
$req->content('{ "first": "Nigel", "last": "Horne" }');
my $resp = $ua->request($req);
if($re
rt::JSON - Dump the parsed docs into JSON
=head1 INHERITANCE
OODoc::Export::JSON
is an OODoc::Export
is an OODoc::Object
=head1 SYNOPSIS
my $doc = OODoc->new(...);
$doc->export('json');
my $exporter = OODoc::Export::JSON->new;
=head1 DESCRIPTION
Create a JSON dump or the parsed documentation, useful to work with dynamically
generated web-pages.
Extends L<"DESCRIPTION" in OODoc
efined in --Default
markup OODoc::Export <required>
serializer OODoc::Export 'json'
=over 2
=item markup => $markup
=item serializer => $name
=back
=back
=head2 Attributes
E
P::Status qw(status_message);
use HTTP::Date qw(time2str str2time);
use URI;
use URI::Escape;
use JSON;
use MIME::Base64;
use utf8;
use Carp qw( croak );
use vars qw( $_ua );
# find out if compressi
url = "https://api.ebay.com/commerce/taxonomy/v1/category_tree/0/get_category_suggestions";
my $json = $ebay->RESTful_Query( $base_url, { q => "wilton vise" } );
Result of submitRequest is a per
= $_ua->request($req);
# Check result
if ($res->is_success) {
my $data = decode_json($res->decoded_content);
my $access_token = $data->{access_token};
my $expires = $
t;
use Scalar::Util;
use Socket; # For AF_INET
use 5.008;
use Log::Any qw($log);
# use Cwd;
# use JSON::Parse;
use List::Util (); # Can go when expect goes
# use Sub::Private;
use Sys::Path;
use name
content_type =~ /application\/json/i) {
require JSON::MaybeXS && JSON::MaybeXS->import() unless JSON::MaybeXS->can('parse_json');
# require JSON::MaybeXS;
# JSON::MaybeXS->import();
my $b
$stdin_data = $buffer;
}
# JSON::Parse::assert_valid_json($buffer);
# my $paramref = JSON::Parse::parse_json($buffer);
my $paramref = decode_json($buffer);
foreach my $key(keys(%{$
package SmsAero;
use strict;
use warnings;
use JSON;
use LWP::UserAgent;
use HTTP::Request;
use URI::Escape;
use Email::Valid;
use Time::Piece;
use Log::Log4perl qw(:easy);
use MIME::Base64;
our $VE
l with data ", encode_json($data));
my $req = HTTP::Request->new(
'POST',
$url,
[
'Content-Type' => 'application/json',
'Au
],
encode_json($data || {})
);
my $res = $self->{_ua}->request($req);
if ($res->is_success) {
my $content = decode_json($res->content);
ile::Basename;
use File::Path qw(remove_tree);
use File::Temp qw(tempfile);
use Getopt::Long;
use JSON::PP;
use List::Util qw(max);
use XML::LibXML;
use EBook::Ishmael::EBook;
use EBook::Ishmael::Im
=> 'kf8',
);
# TODO: At some point in the future, remove pjson and pxml
my %META_MODES = map { $_ => 1 } qw(
ishmael json pjson xml pxml
);
# Replace characters that cannot be encoded with
my $self = shift;
if ($self->{Meta} eq 'pxml' or $self->{Meta} eq 'pjson') {
warn "Using 'pxml' or 'pjson' as a metadata format is deprecated and will be removed in a future release\
stants;
use Carp;
use Data::Dumper;
use English qw(-no_match_vars);
use List::Util qw(none);
use JSON;
use Role::Tiny;
use parent qw(Class::Accessor::Fast);
__PACKAGE__->follow_best_practice();
__
my $obj = eval {
return $result
if join( q{}, @args ) =~ /outputtext/xsm;
return JSON->new->utf8->decode($result);
};
if ( !$obj || $EVAL_ERROR ) {
$self->get_logger->error($
use Try::Tiny;
use Time::HiRes qw(gettimeofday);
use Circle::Common qw(load_config http_json_post http_json_get);
our @EXPORT = qw(
create_wallet
list_wallet
balance_of_address
balance_of_
n the cloud.
=cut
sub create_wallet {
my $url = _build_create_wallet_url();
return http_json_post( $url, {} );
}
sub _build_create_wallet_url {
my $config = load_config();
my $
list here.
}
=cut
sub list_wallet {
my $url = _build_list_wallet_url();
return http_json_get($url);
}
sub _build_list_wallet_url {
my $config = load_config();
my $wallet_pa
Miner;
use 5.006;
use strict;
use warnings;
use Circle::Common qw(build_url_template http_json_post http_json_get);
use Mojo::IOLoop::Subprocess;
use File::Spec;
use POSIX ();
use Slurp;
use Carp;
us
our $VERSION = '0.03';
=head1 SYNOPSIS
Circle::Miner example:
use Circle::Miner;
use JSON;
my $miner = Circle::Miner->new();
my $address = '<your address>';
my $result = $min
er->post_my_block($address, $mined_block, $ip_port);
print "post my block result:" . encode_json($result);
}
...
=head1 EXPORT
there are 4 methods for the Circle::Miner module.
=over
$cfg = $rec->rs()->session()->{cfg}; # XXX maybe make an accessor method
my $holdings = $rec->jsonStructure()->{holdingsRecords2};
return [ map { _makeSingleHoldingsRecord($_, $marc, $cfg) }
ntacts at Lehigh.
#
# The list of valid statuses is wired right into the JSONN Schema at
# mod-inventory-storage/ramls/item.json
#
sub _makeRestrictions {
my($item) = @_;
my $status = $item->
utodie qw(:all);
use JSON::MaybeXS;
use File::Glob ':glob';
use File::Slurp;
use File::stat;
use POSIX qw(strftime);
use Readonly;
Readonly my $cover_db => 'cover_db/cover.json';
Readonly my $output
its in the coverage trend graph
# Read and decode coverage data
my $json_text = read_file($cover_db);
my $data = decode_json($json_text);
my $coverage_pct = 0;
my $badge_color = 'red';
if(my $total
} bsd_glob("coverage_history/*.json");
my $prev_data;
if (@history >= 1) {
my $prev_file = $history[-1]; # Most recent before current
eval {
$prev_data = decode_json(read_file($prev_file));
};
}
REST (or Version 2) interface to the Space
Track web site, a third representation of TLE data, as JSON, has become
available.
Given a chunk of TLE data, the
L<Astro::Coord::ECI::TLE|Astro::Coord::ECI
have installed that module from its own distribution. If
your data are in JSON format, you will need the optional L<JSON|JSON>
module installed.
In practice, TLE data have an effective date, and a s
:EFS;
use strict;
use warnings;
use Carp;
use Data::Dumper;
use English qw(-no_match_vars);
use JSON;
use App::FargateStack::Constants;
use Role::Tiny;
###########################################
Path => $mount_point // '/mnt',
readOnly => defined $readonly && $readonly ? $JSON::true : $JSON::false,
}
]
);
}
############################################################
$policy_source_arn, $resource_arns, $passed_to_service ) = @_;
# Build CLI JSON for --context-entries
my $context_json = sprintf
q|[{"ContextKeyName":"iam:PassedToService","ContextKeyValues":
rns},
'--context-entries' => $context_json,
'--query' => 'EvaluationResults[].EvalDecision',
'--output' => 'json',
]
);
}
############################
st> script,
these parameters are read from the configuration in F<Makefile.PL>
(actually F<MYMETA.json>).
Improves base, see L<OODoc::Object/"Constructors">
-Option --Default
distribution <r
d exporters. The current
implementation contains three POD formatters, one HTML formatter,
and a JSON exporter.
=head2 How OODoc works
Like with POD, you simply mix your documentation with your cod
(into JSON).
My-Dist -------+ +--formatter--> POD
My-Other-Dist -|--parser--> DocTree --|--formatter--> HTML
Even-More -----+ +--exporter---> JSON/HTML
ck::Constants;
use Carp;
use Data::Compare;
use Data::Dumper;
use English qw(-no_match_vars);
use JSON;
use Role::Tiny;
########################################################################
sub b
=> 'schedule:' . $task_name,
EnableECSManagedTags => JSON::true,
EnableExecuteCommand => JSON::false,
PropagateTags => 'TASK_DEFINITION',
NetworkC
k_result(
message => 'ERROR: could not create target [%s] for rule [%s]',
params => [ to_json( $target, { pretty => $TRUE } ), $rule_name ]
);
return;
}
################################
use Data::Dumper;
use English qw(-no_match_vars);
use List::Util qw(none any uniq pairs max);
use JSON;
use App::FargateStack::AutoscalingConfig;
use App::FargateStack::Constants;
use App::FargateSta
ource_id,
policy_type => 'TargetTrackingScaling',
policy_configuration => encode_json($policy_configuration),
);
$app_autoscaling->check_result( message => 'ERROR: could not crea
=> $resource_id,
schedule => $schedule,
scalable_target_action => encode_json($action),
name => $self->create_default( 'scheduled-action-name', $action_n
rail;
use strict;
use warnings;
use Carp;
use Data::Dumper;
use English qw(-no_match_vars);
use JSON;
use Role::Tiny::With;
with 'App::AWS';
use parent qw(App::Command);
__PACKAGE__->follow_best_
ble to lookup events' );
foreach ( @{ $result->{Events} } ) {
$_->{CloudTrailEvent} = from_json( $_->{CloudTrailEvent} );
}
return $result->{Events};
}
###################################
no_match_vars);
use File::Basename qw(fileparse);
use Data::Compare;
use List::Util qw(uniq);
use JSON;
use Test::More;
use Role::Tiny;
##############################################################
sks->{$task_name}->{arn};
}
]
);
my $task_definition = sprintf 'taskdef-%s.json', $task_name;
$self->log_warn(
'register-task-definition: task definition for [%s] cha
###
my ( $self, $task, $action ) = @_;
$action //= 'status';
my $taskdef = "taskdef-$task.json";
my ( $name, $path, $ext ) = fileparse( $taskdef, qr/[.][^.]+$/xsm );
return !$self->get_t