ctConstructor;
extends 'Cfn::Value::TypedValue';
has BackupOptions => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutabi
uctor;
extends 'Cfn::Resource::Properties';
has PipelineDefinition => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutabi
ctConstructor;
extends 'Cfn::Resource::Properties';
has Attributes => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutabi
s ($text, scalar => 1);
=head2 trans_to_json_file
trans_to_json_file ('file.txt', 'file.json');
Convert the translations in F<file.txt> into F<file.json>.
=head2 write_trans
write_trans
fatal error occurs.
=head1 DEPENDENCIES
=over
=item L<JSON::Create>
This is used for storing the translations in JSON format.
=item L<JSON::Parse>
This is only used by the tests.
=item L<Table:
This outputs a JSON file containing the
link, the status, the location, and the files which contain the link.
The function L</html_report> generates an HTML representation of the
JSON file.
The fun
k the links returned by L</get_links> and write to a JSON file
specified by the C<out> option.
check_links ($links, out => "link-statuses.json");
Usually one would filter the links returned by L
links.
=head2 html_report
html_report (in => 'link-statuses.json', out => 'report.html');
Write an HTML report using the JSON output by L</get_links>. The
report consists of header HTML genera
::Make::Page 'make_page';
use File::Slurper qw!read_text write_text!;
use JSON::Create 'write_json';
use JSON::Parse 'read_json';
use Convert::Moji 'make_regex';
our $VERSION = '0.02';
sub get_links
my $verbose = $options{verbose};
my $nook = $options{nook};
my $tempfile = "$out-temp.json";
my %skip;
my $ua = LWP::UserAgent->new (
agent => __PACKAGE__,
);
$ua->max_red
ut after five seconds (dead sites etc.)
$ua->timeout (5);
if (-f $out) {
my $old = read_json ($out);
for my $link (@$old) {
if ($link->{status} =~ /200/) {
$skip{$link->{link}} = $li
NOPSIS
# On the command line
$ catmandu import -v JSON --multiline 1 to MongoDB --database_name bibliography --bag books < books.json
$ catmandu export MongoDB --database_name bibliograph
json_file
write_trans
/;
our %EXPORT_TAGS = (
all => \@EXPORT_OK,
);
our $VERSION = '0.02';
use Table::Readable '0.05', qw!read_table read_table_hash!;
use JSON::Create 'write_json';
use JSON
;
}
return $trans;
}
sub trans_to_json_file
{
my ($trans_file, $json_file) = @_;
my $trans = read_trans ($trans_file);
write_json ($json_file, $trans, indent => 1, sort => 1);
}
ables;
use 5.008008;
use strict;
use warnings;
use Carp;
use CGI::Simple;
use DBI;
use JSON::XS;
use SQL::Abstract::Limit;
use JQuery::DataTables::Request;
our $VERSION = '0.08';
#
mns,$as_hash);
}
sub print_json {
my $self = shift;
my $json = $self->json;
print "Content-type: application/json\n\n";
print $json;
}
sub table_data {
output;
} # /table_data
sub json {
my $self = shift;
my $output_href = $self->table_data;
return encode_json $output_href;
} # /json
sub _create_datatables_reque
;
my $re = $Unicode::Confuse::Regex::re;
use JSON::Parse 'read_json';
my $jfile = __FILE__;
$jfile =~ s!\.pm$!/confusables.json!;
our $data = read_json ($jfile);
sub confusable
{
my ($c) = @_;
P;
$App::JESP::VERSION = '0.016';
use Moose;
use App::JESP::Plan;
use App::JESP::Colorizer;
use JSON;
use Class::Load;
use DBI;
use DBIx::Simple;
use File::Spec;
use IO::Interactive;
use Log::Any qw
( is => 'ro', isa => 'App::JESP::Colorizer', lazy_build => 1 );
has json => ( is => "ro", lazy_build => 1 );
sub _build_json { JSON->new->relaxed(1) }
sub _build_driver{
my ($self) = @_;
ret
}
sub _build_plan{
my ($self) = @_;
my $file = File::Spec->catfile( $self->home(), 'plan.json' );
unless( ( -e $file ) && ( -r $file ) ){
die "File $file does not exists or is not
he confusables
# file. The return value is a hash reference which is then directly
# converted to JSON.
sub metadata
{
my ($file) = @_;
if (! -f $file) {
die "No $file";
}
my %md;
be installed manually. The
prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated
by running the manual build process described above.
## Configure Prerequisites
This
s_meta_yml ? '"configure_requires" key of META.yml' : '',
$has_meta_json ? '"{prereqs}{configure}{requires}" key of META.json' : '',
)}}.
## Other Prerequisites
This distribution may require add
$has_meta_yml ? '"PHASE_requires" key of MYMETA.yml' : '',
$has_meta_json ? '"{prereqs}{PHASE}{requires}" key of MYMETA.json' : '',
)}}.
## Documentation
{{ $dist->name }} documentation is avail
, \%headers ) same as $ua->send( GET, $url, \%data, \%headers );
Get Json Data - grab the content body from the response and json decode
$ua = HTTP::API::Client->new(base_url => URI->new("http://go
"/search" => { q => "something" });
my $hashref_from_decoded_json_string = $ua->json_response;
## ps. this is just an example to get json from a rest api
Send a query string to server
$ua = HTTP:
= $ua->last_response; ## is a HTTP::Response object
At the moment, only support query string and json data in and out
=head1 ENVIRONMENT VARIABLES
These enviornment variables expose the controls wi
item C<decoder>
A code reference to use for decoding responses. Defaults to using
C<decode_json> from L<JSON::PP>.
=item C<default_args>
A hash reference with default parameters that will be passed
e decoder.
By default Solr returns JSON, therefore the fastest decoder for this would be
L<JSON::XS>. You can swap out L<JSON::PP> for L<JSON::XS> like so:
use JSON::XS ();
use WebService::Solr::Ti
ny;
my $solr = WebService::Solr::Tiny->new( decoder => \&JSON::XS::decode_json );
However it's possible to make Solr return a compact binary format known as
JavaBin, to do so we send C<wt=javabin>
currency_file";
local $/; $DATA = <$fh>;
$fh->close;
}
my $data = $self->json->decode($DATA)->{data};
my %rows = ();
foreach my $row(@$data) {
my ($base, $coi
:Tiny->new( keep_alive => 1 ) };
$self->{decoder} //=
do { require JSON::PP; \&JSON::PP::decode_json };
$self->{default_args} //= {};
$self->{url} //= 'http://localho
result->json );
}
sub clock ($s) {
my $tx = $s->ua->build_tx( GET => $s->endpoint . '/v2/clock' );
$tx = $s->ua->start($tx);
return to_Clock( $tx->result->json );
$tx = $s->ua->start($tx);
return @{ ( ArrayRef [Calendar] )->assert_coerce( $tx->result->json ) };
}
sub assets ( $s, %params ) {
my $params = '';
$params .= '?' . jo
] )->assert_coerce(
$s->ua->get( $s->endpoint . '/v2/assets' . $params )->result->json
)
};
}
sub asset ( $s, $symbol_or_asset_id ) {
my $res = $s
y;
my $value = $pair->value;
...
}
Since version C<1.51> they also have a C<TO_JSON> method to ease
serialisation.
=head2 unpairs
my @kvlist = unpairs @pairs
I<Since version
item C<decoder>
A code reference to use for decoding responses. Defaults to using
C<decode_json> from L<JSON::PP>.
=item C<default_args>
A hash reference with default parameters that will be passed
e decoder.
By default Solr returns JSON, therefore the fastest decoder for this would be
L<JSON::XS>. You can swap out L<JSON::PP> for L<JSON::XS> like so:
use JSON::XS ();
use WebService::Solr::Ti
ny;
my $solr = WebService::Solr::Tiny->new( decoder => \&JSON::XS::decode_json );
However it's possible to make Solr return a compact binary format known as
JavaBin, to do so we send C<wt=javabin>