schema => 'str*',
tags => ['category:pericmd-attribute'],
},
per_arg_json => {
schema => 'bool*',
tags => ['category:pericmd-attribute'],
}
te> => I<bool> (default: 0)
Whether to overwrite output if previously exists.
=item * B<per_arg_json> => I<bool>
(No description)
=item * B<per_arg_yaml> => I<bool>
(No description)
=item * B<pr
_',
Exit code will be non-zero all numbers are invalid. To check for individual
numbers, use the JSON output.
_
args => {
ean8_numbers => {
'x.name.is_plural' => 1,
Check a couple of EAN-8 numbers, via pipe, JSON output',
src_plang => 'bash',
src => 'echo -e "9638-5074\\n12345678" | [[prog]] --json',
},
],
};
sub check_ean8 {
_',
Exit code will be non-zero all numbers are invalid. To check for individual
numbers, use the JSON output.
_
args => {
ean13_numbers => {
'x.name.is_plural' => 1,
::UID2Client::refresh_json(json)
const char* json;
CODE:
uid2::RefreshResult result = uid2::RefreshResult::MakeError("");
try {
result = THIS->RefreshJson(json);
}
catch (s
croak("%s", str);
}
catch (...) {
croak("exception occurred during refresh_json()");
}
RETVAL = make_refresh_result(aTHX_ result);
OUTPUT:
RETVAL
SV*
uid2::UID2Clie
Dumper;
use FASTX::Reader;
use File::Basename;
use File::Spec;
use Term::ANSIColor qw(color);
use JSON::PP;
use Capture::Tiny qw(capture);
use Time::HiRes qw( time );
use Scalar::Util qw( blessed refa
});
}
if (!-d '.git' and -f 'META.json' and !exists $removed{'Git::GatherDir'})
{
_warn_me(
'.git is missing and META.json is present -- this looks like a CPAN downlo
check_all_prereqs => 1
}
],
qw(PruneCruft ManifestSkip MetaYAML MetaJSON),
['License' => { filename => $self->license }],
['ReadmeFromPod' => { type =>
ild
module = ... ; lookup syntax
[PruneCruft]
[ManifestSkip]
[MetaYAML]
[MetaJSON]
[License]
filename = LICENSE
[ReadmeFromPod]
type = markdown
readme = READ
special files/dirs
my @special_files = sort (qw(Makefile.PL Build.PL META.yml META.json MYMETA.yml MYMETA.json dist.ini cpanfile SIGNATURE MANIFEST MANIFEST.SKIP test.pl LICENSE LICENCE));
my
d.";
},
},
{
name => 'has_meta_json',
error => q{The file "META.json" is missing from this distribution. META.json has better information than META.yml and is preferred
> q{Add a META.json to the distribution. Your buildtool should be able to autogenerate it.},
code => sub {
my $d = shift;
return 1 if $d->{file_meta_json};
}
sub _from_meta {
my ($class, $me) = @_;
my $meta = $me->d->{meta_yml}; # $me->d->{meta_json} || $me->d->{meta_yml};
return unless $meta && ref $meta eq ref {};
my $spec = $meta->{'
$VERSION =~ s/_//; ## no critic
sub order { 10 }
my $JSON_DECODER = _load_json_decoder() || do { require JSON::PP; JSON::PP->can('decode_json') };
#################################################
= $me->distdir;
my $meta_yml = catfile($distdir, 'META.yml');
my $meta_json = catfile($distdir, 'META.json');
my $mymeta_yml = catfile($distdir, 'MYMETA.yml');
# META.yml is not a
}
# check also META.json (if exists).
if (-f $meta_json && -r _) {
_analyse_json($me, $meta_json);
}
# If, and only if META.yml and META.json don't exist,
# try MYMET
argv => [@{ $eg->{argv} }],
meta => $meta,
per_arg_json => 1,
per_arg_yaml => 1,
);
die "Can't conver
e retrieve the result by calling through Riap,
# the result will enveloped and be json-cleaned.
my %extra;
if ($eg->{argv}) {
$extra
nd boolean.
this is ignored when apply_sql_types is not true.
$teng->set_boolean_value(JSON::XS::true, JSON::XS::false);
=item C<$teng-E<gt>load_plugin();>
$teng->load_plugin($plugin_class, $opt
of the JSON data model, i.e.
when you can represent something useful in JSON, you should be able to
represent it in CBOR.
In short, CBOR is a faster and quite compact binary alternative to JSON,
with
the added ability of supporting serialisation of Perl objects. (JSON
often compresses better than CBOR though, so if you plan to compress the
data later and speed is less important you might want to
exts in the megabyte range,
C<CBOR::XS> usually encodes roughly twice as fast as L<Storable> or
L<JSON::XS> and decodes about 15%-30% faster than those. The shorter the
data, the worse L<Storable> per
c->{is_base64}) {
$add_sum = " (base64-encoded)";
} elsif ($ospec->{is_json}) {
$add_sum = " (JSON-encoded)";
} elsif ($ospec->{is_yaml}) {
$add_sum = " (YAML-encoded)"
tags => ['category:script-specification'],
},
per_arg_json => {
summary => 'Set `per_arg_json` attribute, see Perinci::CmdLine::Base',
schema => ['bool*',
},
default_subcommand => $args{default_subcommand},
per_arg_json => $args{per_arg_json},
per_arg_yaml => $args{per_arg_yaml},
read_env
lean::ForJSON;
state $cleanser = Data::Clean::ForJSON->get_cleanser;
$cleanser;
}
sub _json {
require JSON::MaybeXS;
state $json = JSON::MaybeXS->new->allow_nonref;
$json;
}
sub
INTO package (name, summary, metadata, mtime) VALUES (?,?,?,0)", {}, $pkg, $pkgmeta->{summary}, _json->encode($pkgmeta), $st[9]) unless $rec;
$dbh->do("UPDATE package set mtime=? WHERE name=?
ion (package, name, summary, metadata) VALUES (?,?,?,?)", {}, $pkg, $func, $funcmeta->{summary}, _json->encode($funcmeta));
}
}
$progress->finish if $progress;
@pkgs = grep { my $
);
if( not $res[0] ) {
$dsl->status( 400 );
return $dsl->send_as( JSON => { error => $res[1] } );
} else {
$dsl->app->request->var( oauth_access_tok
or $type ne 'code'
) {
$dsl->status( 400 );
return $dsl->send_as(
JSON => {
error => 'invalid_request',
error_description =>
nd ! length $state
) {
$dsl->status( 400 );
return $dsl->send_as(
JSON => {
error => 'invalid_request',
error_description =>
ocess_response( $resp );
}
1;
package Net::Async::DigitalOcean;
use strict;
use warnings;
use JSON;
use Data::Dumper;
use HTTP::Status qw(:constants);
use Moose;
our $VERSION = '0.05';
use Log:
<image> and other concepts.
Instead, the library truthfully transports Perl HASHes and LISTs via JSON to the server and back;
even to the point to B<exactly> reflect the L<API specification|https://d
->{rel}));
#warn "not completed asking for ".$a->{id}.' at '.$u;
# TODO type check
my $f2 = _mk_json_GET_future( $elf, $u );
$f2->on_done( sub {
#warn "action returned ".Dumper \@_;
my ($b)
package WebService::Mailgun;
use 5.008001;
use strict;
use warnings;
use Furl;
use JSON;
use URI;
use Try::Tiny;
use Carp;
use HTTP::Request::Common;
use File::Temp;
our $VERSION = "0.16";
our $A
s) {
return decode_json $res->content;
} else {
my $json;
try {
$json = decode_json $res->content;
} catch {
$json = { message => $res->cont
ent };
};
$self->{error} = $json->{message};
$self->{error_status} = $res->status_line;
if ($self->RaiseError) {
carp $self->error;
croak $self-
cc" : $tag;
}
sub TO_JSON {
my ($self) = @_;
return {map {$_ => $self->{$_}} keys %$self};
}
sub abbreviated {
my ($self) = @_;
my $abbr = dclone($self->TO_JSON);
delete $abbr->{
rt;
use PICA::Parser::Binary;
use PICA::Parser::PPXML;
use PICA::Parser::PIXML;
use PICA::Parser::JSON;
use PICA::Writer::XML;
use PICA::Writer::Plus;
use PICA::Writer::Plain;
use PICA::Writer::Patch;
rt;
use PICA::Writer::Binary;
use PICA::Writer::PPXML;
use PICA::Writer::PIXML;
use PICA::Writer::JSON;
use PICA::Writer::Generic;
sub pica_parser {
_pica_module('PICA::Parser', @_);
}
sub pica_
$//),
'Binary' => ($pica =~ tr/\x{1F}//),
'XML' => ($pica =~ tr/<//),
'JSON' => ($pica =~ tr/[{[]//),
'NL' => ($pica =~ tr/[\r\n]//),
'IS3' => ($pic
:Parser::Import>
=item L<PICA::Parser::XML>
=item L<PICA::Parser::PPXML>
=item L<PICA::Parser::JSON>
=item L<PICA::Parser::Patch>
=back
=head2 CONFIGURATION
=over
=item strict
By default faul
>{$_}{required};
}
$self->{records}++;
}
sub schema {
my $schema = dclone($_[0]->TO_JSON);
my $fields = $schema->{fields};
delete $fields->{$_} for grep {!$fields->{$_}{total}}