rlyEnd => ts_to_iso_date(time()+8*24*3600)
);
if ($response->is_success) {
my $json = $response->decoded_content;
} else {
die $response->status_line;
}
=head1 DESC
the requested location.
Returns a string containing the JSON data, except in array context, in which case,
as a convenience, it will use L<JSON> to decode it directly to a Perl hash.
Requires L<LWP:
d2 C<jwt>
my $jwt = $wk->jwt(
iat => $iat?,
exp => $exp?
);
Returns the JSON Web Token string in case you need it. Will return a cached one
if it has more than 10 minutes unt
www.gnu.org/licenses/>.
package App::Chart::Suffix::NZ;
use 5.006;
use strict;
use warnings;
use JSON;
use URI::Escape;
use Locale::TextDomain 'App-Chart';
use App::Chart;
use App::Chart::Database;
at
#
# https://www.nzx.com/markets/NZSX/dividends
#
# The dividend table is buried in a JSON data structure in <script>
# so as minimise the number browsers which will display it.
# As of Se
<\/script>/i
or die "NZX dividends cannot find JSON table";
my $str = $1;
my $json = JSON::from_json($1) // {};
my $props = $json->{'props'} // {};
my $pageProps = $props-
< ./t/test.xlsx > test.csv
# Convert Excel to JSON
$ catmandu convert XLS to JSON
$ catmandu convert XLS
# Convert Excel to JSON providing own field names
$ catmandu convert XL
aje::Plugin::Database::Operations;
use Daje::Tools::Filechanged;
use Mojo::File;
use Mojo::JSON qw{from_json};
has 'source_path';
has 'files';
has 'filetype' ;
has 'changed_files' ;
has 'change';
s
n 1;
}
sub load_json($self, $file) {
my $context;
eval {
$context = Mojo::File->new($file)->slurp;
};
die "load_json failed '$@" if $@;
return from_json($context);
}
su
pod - keep this line to make pod updates possible ####################
=head1 REQUIRES
L<Mojo::JSON>
L<Mojo::File>
L<Daje::Tools::Filechanged>
L<Daje::Plugin::Database::Operations>
L<Daje::
@{$self->json->{tables}};
for (my $i = 0; $i < $length; $i++) {
$self->_generate_table_class(@{$self->json->{tables}}[$i]);
$self->_generate_interface_class(@{$self->json->{tables
able_name});
}
$length = scalar $self->json->{views};
for (my $i = 0; $i < $length; $i++) {
$self->_generate_view_class(@{$self->json->{views}}[$i]);
}
return 1;
}
sub _ge
$template = $self->template();
my $class = Daje::Plugin::Perl::Generate::Class->new(
json => $table->{table},
methods => $methods,
template => $template,
conf
self->fields->select();
my $p_key = $self->fields->primary_key();
my $table_name = $self->json->{table_name};
$tpl =~ s/<<select_fields>>/$select/ig;
$tpl =~ s/<<primary_key>>/$p_key/
lf) {
my $tpl = $self->template->get_data_section('update_data');
my $table_name = $self->json->{table_name};
$tpl =~ s/<<table_name>>/$table_name/ig;
return $tpl;
}
sub _insert_metho
lf) {
my $tpl = $self->template->get_data_section('insert_data');
my $table_name = $self->json->{table_name};
$tpl =~ s/<<table_name>>/$table_name/ig;
return $tpl;
}
sub _get_from_fke
e Mojo::Util qw(b64_encode url_escape);
use XML::Simple 'XMLin'; ## no critic
use JSON::MaybeUTF8 qw(encode_json_utf8);
use HTTP::Tiny;
use Mojo::URL;
use vars qw/$errstr/;
sub errstr { return $er
rate($self) {
$self->_get_fields();
}
sub _get_fields($self) {
my $column_names = $self->json->{column_names};
my $length = scalar @{$column_names};
for (my $i = 0; $i < $length; $i++
te($self) {
my $tpl = $self->template->get_data_section('class');
my $table_name = $self->json->{table_name};
my $name_space = $self->config->{CLASS}->{name_space};
my $base_name_space
ate_fkey} = "";
$self->templates->{template_ind} = "";
eval {
my $fields = $self->json->{fields};
foreach my $key (sort keys %{$fields}) {
if (index($key,'_fkey') >
N = "0.01";
sub create_fields($self){
my $field = '';
eval {
my $fields = $self->json->{fields};
foreach my $key (sort keys %{$fields}) {
$field .= $key . ' ' . $f
ERSION = "0.01";
sub create_index($self) {
my $sql = "";
my $json = $self->json->{index};
my $length = scalar @{$json};
for (my $i = 0; $i < $length; $i++) {
my $template = $s
s/<<type>>/@{$json}[$i]->{type}/ig;
$template =~ s/<<fields>>/@{$json}[$i]->{fields}/ig;
@{$json}[$i]->{fields} =~ s/,/_/ig;
$template =~ s/<<field_names>>/@{$json}[$i]->{field
se DateTime;
use DateTime::TimeZone;
use Encode ();
use Fcntl qw( :DEFAULT );
use JSON ();
use Scalar::Util;
use Text::PO::Element;
use constant HAS_LOCAL_TZ => ( eval( qq{
f->{meta} = {};
$self->{meta_keys} = [];
## Default to using po json file if it exists
$self->{use_json} = 1;
$self->{remove_duplicates} = 1;
$self->{_init_strict_use_sub}
set_get_array_as_object( 'added', @_ ) ); }
sub as_hash { return( shift->hash( @_ ) ); }
sub as_json
{
my $self = shift( @_ );
my $opts = $self->_get_args_as_hash( @_ );
my $metaKeys = $
ode( ":utf8" );
&_load_plurals();
my $dict =
{
# Actions
as_json => { type => 'boolean' },
as_po => { type => 'boolean' },
file path was specified to initiate.\n" );
&init_po( $out );
}
elsif( $opts->{as_json} && $opts->{output} )
{
my $f = shift( @ARGV ) || bailout( "No po file to read was pr
put}\"." );
&to_json( in => $f, out => $opts->{output} );
}
elsif( $opts->{as_po} && $opts->{output} )
{
my $f = shift( @ARGV ) || bailout( "No (json) po file to read was p
allenge_b64 => ... ,
requested_uv => ... ,
client_data_json_b64 => ... ,
attestation_object_b64 => ... ,
token_binding_id_b64 =>
stored_sign_count => ...,
requested_uv => ...,
client_data_json_b64 => ...,
authenticator_data_b64 => ...,
signature_b64 => ..
this operation.
Possible values are C<required>, C<preferred>, C<discouraged>.
=item client_data_json_b64
The base64url-encoded client data received from the authenticator
=item attestation_object_
se JSON::MaybeXS 1.003003 qw();
use LWP::UserAgent 6.04 qw();
use URI 1.31;
my $CONTENT_TYPE = 'application/json';
sub new {
my ($class, $driver) = @_;
my $self = bless {
json_coder => JSON::
;
}
return $self;
}
sub ua { shift->{agent} }
sub uri { shift->{uri_base} }
sub json_coder { shift->{json_coder} }
sub http_reason { shift->{response}->message // '' }
sub date_header { scal
{
my ($self, $method, $url, $json, $accept, $mode) = @_;
$self->{buffer} = undef;
$url = URI->new_abs( $url, $self->{uri_base} );
$method = lc $method;
if ($json) {
$self->{response} = $sel
:Parser::Base';
use Compiled::Params::OO qw/cpo/;
use Types::Standard qw/Object HashRef Str/;
use JSON;
use Text::CSV_XS qw/csv/;
our $validate;
BEGIN {
$validate = cpo(
get_value => [Object, Hash
tent =~ m/^([A-Za-z]+)\s*\:/) {
$tag = 'text';
} elsif ($$content =~ m/^\s*\[/) {
$tag = 'json';
} elsif ($$content =~ m/^([A-Za-z]+,)/) {
$tag = 'csv';
} elsif ($$content =~ m/---/) {
ed/i;
return 'Meta' if $tag =~ /^html/i;
return 'Text' if $tag =~ /^text/;
return 'JSON' if $tag =~ /^json/;
return 'CSV' if $tag =~ /^csv/;
return 'Table' if $tag =~ /^table/;
return 'YAM
', ', grep { $hs->parse($_) } @{ $content } : $content;
return $string;
}
);
has 'json' => (
is => 'rw',
lazy => 1,
default => sub {
return shift->raw;
},
);
1
ationship 1.02;
# ABSTRACT: Describes a relationship from a Neo4j graph, delivered via Jolt v1 or JSON
# For documentation, see Neo4j::Driver::Types.
use parent 'Neo4j::Driver::Type::Relationship'