tly::Object::LoggingFtpAllOf;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
nabledProductResponseService;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json
tent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$he
tent-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$he
e' header
my $_header_accept = $self->{api_client}->select_header_accept('application/vnd.api+json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$he
e' header
my $_header_accept = $self->{api_client}->select_header_accept('application/vnd.api+json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$he
e' header
my $_header_accept = $self->{api_client}->select_header_accept('application/vnd.api+json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$he
Object::OriginInspectorEntry;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
alhost/db') };
get '/' => sub {
my $c = shift;
my $db = $c->mysql->db;
$c->render(json => $db->query('select now() as time')->hash);
};
app->start;
While all I/O operations are p
:mysql::Database;
use Mojo::Base 'Mojo::EventEmitter';
use Carp;
use Mojo::IOLoop;
use Mojo::JSON 'to_json';
use Mojo::mysql::Results;
use Mojo::mysql::Transaction;
use Mojo::Promise;
use Mojo::Util
i];
my %attrs;
if (ref $param eq 'HASH') {
if (exists $param->{json}) {
$param = to_json $param->{json};
}
elsif (exists $param->{type} && exists $param->{value}) {
t into foo values (?, ?, ?)', @values);
my $results = $db->query('insert into foo values (?)', {json => {bar => 'baz'}});
my $results = $db->query('insert into foo values (?)', {type => SQL_INTEGE
la::Plugin::Meta::Contributors;
use Dist::Zilla::Plugin::MetaConfig;
use Dist::Zilla::Plugin::MetaJSON;
use Dist::Zilla::Plugin::MetaProvides::Package;
use Dist::Zilla::Plugin::MetaResources;
use Dist
dWeaver;
use Dist::Zilla::Plugin::Test::CPAN::Changes;
use Dist::Zilla::Plugin::Test::CPAN::Meta::JSON;
use Dist::Zilla::Plugin::Test::CleanNamespaces;
use Dist::Zilla::Plugin::Test::Compile;
use Dist
index => 1 } ],
qw(
Meta::Contributors
MetaConfig
MetaJSON
MetaYAML
),
);
}
sub _meta_resources {
my $self = shift;
my %re
alhost/db') };
get '/' => sub {
my $c = shift;
my $db = $c->mysql->db;
$c->render(json => $db->query('select now() as time')->hash);
};
app->start;
While all I/O operations are p
sources => '+SourcesWithFiles',
# 'config-files' => ["/etc/$APPNAME.json"],
options => [
{
getopt => 'config|c=s',
ion file',
environment => 1,
# default => "$ENV{HOME}/.$APPNAME.json",
},
],
children => [qw< foo bar >],
},
foo => {
e strict;
use warnings;
use constant DEBUG => $ENV{DEBUG};
use if DEBUG, 'Smart::Comments';
use JSON;
our $VERSION = '1.67_01'; # TRIAL VERSION
sub parameters {
return ('API_KEY');
}
sub new
{
$reply->content;
my $json_data = JSON::decode_json $body;
if ( !$json_data || $json_data->{error} || not exists $json_data->{rates}) {
### fixer error : $json_data->{error}->{info}
return;
}
$this->{cache} = $json_data->{rates};
### Fixer rates: $this->{cache}
}
if (exists $this->{cache}->{$from} and exists $this->{cache}->{$to}) {
### from : $from, $th
urce_JsonFileFromConfig ($self, $key, @ignore) {
$key = $key->[0] // 'config';
defined(my $filename = $self->config($key)) or return {};
require JSON::PP;
return JSON::PP::decode_json($sel
b source_JsonFileFromConfig
sub slurp ($self, $file, $mode = '<:encoding(UTF-8)') {
open my $fh, $mode, $file or die "open('$file'): $!\n";
local $/;
return <$fh>;
}
sub source_JsonFiles ($
nore) {
require JSON::PP;
return $self->merge_hashes(
map { JSON::PP::decode_json($self->slurp($_)) }
grep { -e $_ } $candidates->@*
);
} ## end sub source_JsonFiles
sub source_
## end else [ if ('SCALAR' eq ref $application)]
return eval {
require JSON::PP;
JSON::PP::decode_json($text);
} // eval { eval $text; } // die "cannot load application\n";
} ## en
ck_JsonFileFromConfig ($self, $spec, $args) {
my $key = $spec->{'config-option'} // 'config';
return {} if !exists($spec->{config}{$key});
require JSON::PP;
return JSON::PP::decode_json(sl
# end sub stock_JsonFileFromConfig
sub stock_JsonFiles ($self, $spec, @ignore) {
return merger($self, $spec)->(
map {
require JSON::PP;
JSON::PP::decode_json(slurp($_));
package Mojo::mysql::Results;
use Mojo::Base -base;
use Mojo::Collection;
use Mojo::JSON 'from_json';
use Mojo::Util 'tablify';
has [qw(db sth)];
sub array { ($_[0]->_expand({list => 0, type => 'ar
my $from_json = __PACKAGE__->can(sprintf '_from_json_mode_%s_%s', $mode, $to->{type});
$from_json->($_, $idx, $names) for @$sql_data;
}
return @$sql_data;
}
sub _from_json_mode_1_array
$names) = @_;
$r->[$_] = from_json $r->[$_] for grep { defined $r->[$_] } @$idx;
}
sub _from_json_mode_1_hash {
my ($r, $idx, $names) = @_;
$r->{$_} = from_json $r->{$_} for grep { defined $r-
e strict;
use warnings;
use constant DEBUG => $ENV{DEBUG};
use if DEBUG, 'Smart::Comments';
use JSON;
our $VERSION = '1.67_01'; # TRIAL VERSION
sub parameters {
return ('API_KEY');
}
sub new
{
l = 'https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE';
my $try_cnt = 0;
my $json_data;
my $rate;
do {
$try_cnt += 1;
my $reply = $ua->get($url
. '&from_curren
$json_data = JSON::decode_json $body;
if ( !$json_data || $json_data->{'Error Message'} ) {
return;
}
### JSON: $json_data
sleep (20) if (($try_cnt < 5) && ($json_data-
d through a hash reference (or something that
can I<be transformed> into a hash reference, like a JSON-encoded string
containing an object, or Perl code) with the description of the
different aspects
+JsonFileFromConfig> and C<+JsonFiles> to the ones above. The
former looks for a configuration named C<config> (or whatever is set as
C<config-option> in the overall configuration hash) to load a JSON
file
with additional configurations; the latter looks for a list of JSON
files to try in C<config-files> inside the configuration hash.
=over
Although the C<+Default> source is put I<first>, it act
uV`; do echo "sub $sub;"; done
sub AUTOLOAD;
sub DEBUG;
sub DESTROY;
sub FREEZE;
sub THAW;
sub TO_JSON;
sub VERBOSE;
sub as_hash;
sub clear;
sub clear_error;
sub clone;
sub coloured;
sub colour_close;
ub new;
sub new_array;
sub new_datetime;
sub new_file;
sub new_glob;
sub new_hash;
sub new_json;
sub new_json_safe;
sub new_null;
sub new_number;
sub new_scalar;
sub new_tempdir;
sub new_tempfile;
sub
vided to deserialise with $class." ) );
}
}
# NOTE: deserialise with JSON
elsif( $class eq 'JSON' )
{
my @options = qw(
allow_blessed allow_nonref allow_unk
:Comments';
use HTTP::Request::Common;
use HTML::TreeBuilder;
use Encode qw(decode);
use JSON qw( decode_json );
use utf8;
our $VERSION = '1.67_01'; # TRIAL VERSION
my $Bourso_URL = 'https://www.bo
my $json = JSON::decode_json($div->attr('data-ist-init'));
$date = $json->{'tradeDate'};
$last = $json->{'last'};
$symbol = $json->{'symbol'
= $json->{'low'};
$high = $json->{'high'};
$close = $json->{'previousClose'};
$exchange = $json->{'exchangeCode'};
$volume = $json->{'
constant DEBUG => $ENV{DEBUG};
use if DEBUG, 'Smart::Comments';
use LWP::UserAgent;
use JSON qw( decode_json );
use String::Util qw(trim);
our $VERSION = '1.67_01'; # TRIAL VERSION
our $DISPLAY =
charset=UTF-8',
};
my $reply = $ua->post($url, $form);
my $search = JSON::decode_json $reply->content;
### Search : $url, $form, $reply->code
### Search : $sea
BUG};
use if $DEBUG, 'Smart::Comments';
use HTTP::Request;
use LWP::UserAgent;
use JSON qw( decode_json encode_json );
use String::Util qw(trim);
our $VERSION = '1.67_01'; # TRIAL VERSION
our @labe
"authorization" => "",
"content-type" => "application/json",
"locale" => "en",
"sec-ch-ua" => "\"
h : $url, $reply->code
### reply : $reply->content
my $data = decode_json $reply->content;
if (exists $data->{errors}) {
$info{$symbol, 'errormsg'} = $da