mentref = \$r;
$console_out = "Downloaded inventory in ".($inventory_type eq INVENTORY_TYPE_JSON ? "JSON" : "CSV")." format";
} elsif ($action eq 'retrieve_archive') {
my $req = App::MtAws::Glaci
ment download, in megabytes
check-local-hash
retrieve-inventory
--request-inventory-format - json or csv
download-inventory
--new-journal - Write inventory as new journal
create-vault VAULT-
validation(option('request-inventory-format', default => 'json'),
message('request-inventory-format must be "json" or "csv"'), sub { /^(json|csv)$/ });
validation positional('vault-name'), messa
package HTCondor::Queue::Parser;
use strict;
use warnings;
use XML::Simple;
use JSON::XS;
# ABSTRACT: parses multible schedds condor_q output, so you don't have to. Serves output in many formats.
XMLin($xml);
$schedds_map{$schedd}{'href'} = $job_data;
}
return %schedds_map;
}
sub schedd_json {
my $self = shift;
my $schedds_map_href = shift;
my $schedd = shift;
my %schedds_map = %{$sc
chedds_map{$schedd}{'href'};
my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
my $json = $coder->encode($schedds_map{$schedd}{'href'});
return $json;
}
1;
__END__
=pod
=head1 NAME
HTC
ath::Tiny>
=head3 L<File::pushd>
=head3 L<File::Copy::Recursive>
=head2 Data Format
=head3 L<JSON::XS>
=head3 L<Data::MessagePack>
=head3 L<Text::CSV>
=head3 L<TOML>
=head3 L<YAML>
=head2 P
in arrays and hashrefs. When the object goes out of scope its contents
are saved to the log as a JSON string.
PLEASE NOTE: Until this module reaches version 1.0, I might make some
non-backwards-comp
stage'} = 1;
$qnd->{'tracks'} = [qw{1 4}];
$qnd->{'coord'} = {x=>1, z=>42};
which results in a JSON string like this:
{"stage":1,"tracks":["1","4"],"time":"Tue May 20 17:13:22 2014","coord":{"x":
he only input for this method is the string to write to the log. The string
should already be in JSON format and should have no newline. C<write_entry()>
doesn't do anything about formatting the str
et::Amazon::Signature::V4;
use Net::Amazon::TreeHash;
use HTTP::Request;
use LWP::UserAgent;
use JSON 2.61;
use POSIX;
use Digest::SHA;
use File::Slurp 9999.19;
use Carp;
=head1 NAME
Net::Amazon::G
lf->_send_receive(
PUT => "/-/vaults/$vault_name/notification-configuration",
[
],
encode_json($content_raw),
);
# updated error severity
croak 'get_vault_notifications failed with error '
topic);
my $res = $self->_send_receive(
POST => "/-/vaults/$vault_name/jobs",
[ ],
encode_json($content_raw),
);
# updated error severity; method must return a job id
croak 'initiate_archiv
use Exporter 'import';
use constant INVENTORY_TYPE_CSV => 'CSV';
use constant INVENTORY_TYPE_JSON => 'JSON';
our @EXPORT = qw/set_filename_encoding get_filename_encoding binaryfilename
sanity_relati
ze file_mtime file_exists file_inodev
is_64bit_os is_64bit_time is_y2038_supported
INVENTORY_TYPE_JSON INVENTORY_TYPE_CSV/;
BEGIN {
if ($File::Spec::VERSION lt '3.13') {
our $__orig_abs_to_rel =
->status_line."\n";
$out .= $resp->headers->as_string;
if ($resp->content_type eq 'application/json' && $resp->content && length($resp->content)) {
$out .= "\n".$resp->content;
}
$out .= "\n\n"
::Harness;
use strict;
use warnings;
use utf8;
use FindBin;
use Config;
# build requirements
use JSON::XS ();
use Test::Deep ();
use Test::Simple ();
use File::Temp ();
use Test::More ();
use Test::M
sync::JSONStream;
use strict;
use warnings;
our $VERSION = '0.02';
use base qw( IO::Async::Stream );
IO::Async::Stream->VERSION( '0.57' ); # ->read future
use JSON qw( encode_json decode_json );
IO::Async::JSONStream> - send or receive lines of JSON data in C<IO::Async>
=head1 SYNOPSIS
use IO::Async::JSONStream;
use IO::Async::Loop;
my $loop = IO::Async::Loop->new;
my $jsonstream = IO
d( $jsonstream );
$jsonstream->connect(
host => "my.server",
service => 12345,
)->then( sub {
$jsonstream->write_json( [ data => { goes => "here" } ] );
$jsonstream->read_json
}
our $VERSION = '1.120';
use strict;
use warnings;
use utf8;
use Encode;
use MIME::Base64;
use JSON::XS;
use POSIX;
use Time::Local;
use App::MtAws::DateTime;
use constant MAX_SIZE => 1024;
use co
ed, characters '+', '/' replaced with '-', '_' resp. and no new lines.
json_utf8() - input - Hash, output - byte sequence
JSON string in UTF-8 representation. Can contain not-escaped UTF-8 character
': FILENAME, 'mtime': iso8601(MTIME)}
Hash with two keys: 'filename' and 'mtime'. Corresponds to JSON 'Object'.
Input data:
=====================
FILENAME (character string)
Is a relative filename
mac_sha256 hmac_sha512);
use MIME::Base64 qw(encode_base64url decode_base64url);
use JSON qw(decode_json encode_json);
use Try::Tiny;
# Constructor attributes
has enc => ( is => 'rw');
has alg
->encode(encode_json($hash));
}
# -----------------------------------------------------------------------------
sub decode_to_hash {
my ($self, $jwe) = @_;
return decode_json($self->decode(
y = ''; # Empty for 'dir' algorithm
my @segment;
push @segment, encode_base64url( encode_json($header) );
push @segment, encode_base64url( $jwe_encryptedKey );
push @segment, encode_b
package Log::QnD;
use strict;
use Carp 'croak';
use String::Util ':all';
use JSON qw{to_json -convert_blessed_universally};
# debugging
# use Debug::ShowStuff ':all';
# use Debug::ShowStuff::ShowVar;
in arrays and hashrefs. When the object goes out of scope its contents
are saved to the log as a JSON string.
PLEASE NOTE: Until this module reaches version 1.0, I might make some
non-backwards-comp
stage'} = 1;
$qnd->{'tracks'} = [qw{1 4}];
$qnd->{'coord'} = {x=>1, z=>42};
which results in a JSON string like this:
{"stage":1,"tracks":["1","4"],"time":"Tue May 20 17:13:22 2014","coord":{"x":
::Glacier::ListJobs;
our $VERSION = '1.120';
use strict;
use warnings;
use utf8;
use Carp;
use JSON::XS 1.00;
use App::MtAws::Utils;
use App::MtAws::MetaData;
sub new
{
my $class = shift;
my $
f->{data};
$self->{data} = JSON::XS->new->allow_nonref->decode(${ delete $self->{rawdata} || confess });
# get rid of JSON::XS boolean object, just in case.
# also JSON::XS between versions 1.0 an
may also use one of the escape sequences understood by tpath, which are
just those understood by JSON. These are
=over 4
=item \t
The tab character.
=item \n
The ASCII newline character -- decim
cal tab character. Why \v? Well, I figure it's important enough to somebody to be
included in the JSON spec, so it's here too. This is character 11 in ASCII's decimal set.
=back
=head1 HISTORY
I wr
$self->installer);
}
my @dirty_files = ('dist.ini', 'Changes', 'META.json', 'README.md', $self->build_file);
my @exclude_release = ('README.md');
$self->add_plugi
git repo installable
[ 'Git::GatherDir', { exclude_filename => [ $self->build_file, 'META.json', 'LICENSE', @exclude_release ] } ],
[ 'CopyFilesFromBuild', { copy => [ 'LICENSE' ] } ],
re eg examples ) ] } ],
[ $self->prereqs ],
[ $self->installer ],
[ 'MetaJSON' ],
# standard stuff
[ 'PodSyntaxTests' ],
[ 'MetaYAML' ],
[ 'Li
pe', 'application/json' ]]);
wait_for_events(sub {
my $new_event = shift;
if ($new_event) {
$writer->write($new_event->as_json . "\n");
my $message = shift;
my $body = [ $message->to_json ];
$respond->([200, ['Content-Type', 'application/json'], $body]);
});
};
};
C<wait_for_new_messag
my $message = shift;
if ($message) {
$writer->write($message->to_json);
} else {
$writer->close;
}
});
};
:Journal;
use App::MtAws::MetaData;
use App::MtAws::DateTime;
use App::MtAws::Glacier::Inventory::JSON;
use App::MtAws::Glacier::Inventory::CSV;
use App::MtAws::QueueJob::FetchAndDownloadInventory;
ttachmentref) = @_;
my $data = do {
if ($inventory_type eq INVENTORY_TYPE_JSON) {
App::MtAws::Glacier::Inventory::JSON->new($$attachmentref)
} elsif ($inventory_type eq INVENTORY_TYPE_CSV) {
tAws::QueueJob';
sub init
{
my ($self) = @_;
$self->{format} or confess;
$self->{format} =~ /^json|csv$/ or confess;
$self->enter('retrieve');
}
sub on_retrieve
{
my ($self) = @_;
return state