CT: An airline flight.
use v5.14;
use Moo;
extends qw/ SemanticWeb::Schema::Trip /;
use MooX::JSON_LD 'Flight';
use Ref::Util qw/ is_plain_hashref /;
# RECOMMEND PREREQ: Ref::Util::XS
use namespa
predicate => '_has_aircraft',
json_ld => 'aircraft',
);
has arrival_airport => (
is => 'rw',
predicate => '_has_arrival_airport',
json_ld => 'arrivalAirport',
);
has
icate => '_has_arrival_gate',
json_ld => 'arrivalGate',
);
has arrival_terminal => (
is => 'rw',
predicate => '_has_arrival_terminal',
json_ld => 'arrivalTerminal',
);
http://maxmind.github.io/MaxMind-DB/>. The short overview is that
anything that can be encoded in JSON can be stored in an MMDB file. It can
also handle unsigned 64-bit and 128-bit integers if they ar
:Hardware;
use Modern::Perl '2018';
use Object::Pad;
use HTTP::Request;
use LWP::UserAgent;
use JSON::XS;
class Hardware {
field $endpoint :param;
field $header :param;
method getH
my $ua = LWP::UserAgent->new();
my $res = $ua->request($r);
my $results = JSON::XS::decode_json($res->{_content});
return $results->{'id'}
}
method getHardwareByAsset
my $ua = LWP::UserAgent->new();
my $res = $ua->request($r);
my $results = JSON::XS::decode_json($res->{_content});
return $results
}
method getHardwareBySerialNumber
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use HTTP::Tiny;
use JSON qw/decode_json/;
use XML::Twig;
use Storable qw/nstore/;
my $twig = XML::Twig->new(
twig_roots => {
my $url = sprintf
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastformula/%s/JSON?MaxRecords=1",
$elements{$el},
;
my $res = $ua->get($url);
etch data for $el: $res->{reason}\n";
next ELEM;
}
my $data = decode_json( $res->{content} );
my @mono = grep {$_->{urn}->{label} eq 'Weight' && $_->{urn}->{name}
ld $accessToken :param = 0;
method snipe () {
my $header = ['Content-Type' => 'application/json; charset=UTF-8', 'Authorization' => 'Bearer '.$accessToken];
my $asset = Hardware->new('heade
sub _json {
state $json = do {
if (eval { require Cpanel::JSON::XS; 1 }) { Cpanel::JSON::XS->new->canonical(1)->convert_blessed->allow_nonref }
elsif (eval { require JSON::Tin
e; 1 }) { JSON::Tiny::Subclassable->new }
elsif (eval { require JSON::PP; 1 }) { JSON::PP->new->canonical(1)->convert_blessed->allow_nonref }
else { die "Can't find any JSON module"
};
$json;
};
sub __cleanse {
state $cleanser = do {
eval { require Data::Clean::JSON; 1 };
if ($@) {
undef;
} else {
Data::Clean::JSON->get_cl
lcpan::Call qw(call_lcpan_script);
use File::chdir;
use File::Spec;
use IPC::System::Options;
use JSON::MaybeXS;
use Perinci::CmdLine::Call; # lazy-loaded by App::lcpan::Call
our $AUTHORITY = 'cpan:P
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("runs");
__PACKAGE__->add_colum
"concurrency",
{ data_type => "integer", is_nullable => 1 },
"parameters",
{ data_type => "jsonb", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("run_id");
__PACKAGE__->add_unique_constra
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("email_verification_codes");
__
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("resource_batch");
__PACKAGE__-
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("job_fields");
__PACKAGE__->add
"name",
{ data_type => "varchar", is_nullable => 0, size => 512 },
"data",
{ data_type => "json", is_nullable => 1 },
"details",
{ data_type => "text", is_nullable => 1 },
"raw",
{ data
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("source_subs");
__PACKAGE__->ad
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("reporting");
__PACKAGE__->add_
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("api_keys");
__PACKAGE__->add_c
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("runs");
__PACKAGE__->add_colum
"concurrency",
{ data_type => "integer", is_nullable => 1 },
"parameters",
{ data_type => "json", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("run_id");
__PACKAGE__->add_unique_constrai
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("test_files");
__PACKAGE__->add
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("permissions");
__PACKAGE__->ad
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("sweeps");
__PACKAGE__->add_col
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("session_hosts");
__PACKAGE__->
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
"Tree::AdjacencyList",
"UUIDColumns",
);
__PACKAGE__->table("events");
__PACKAGE__->add_col
=> 1 },
"facets",
{ data_type => "json", is_nullable => 1 },
"facets_line",
{ data_type => "bigint", is_nullable => 1 },
"orphan",
{ data_type => "json", is_nullable => 1 },
"orphan_line