onical_media_type >>
Returns the canonical media type for SPARQL XML: application/sparql-results+json.
=cut
sub canonical_media_type { return "application/rdf+xml" }
=item C<< media_types >>
Ret
s a list of media types that may be parsed with the SPARQL XML parser:
application/sparql-results+json.
=cut
sub media_types { return [qw(application/rdf+xml application/octet-stream)]; }
=item C
e JSON::Syck;
use JavaScript::Minifier::XS;
#### this ugliness will be spruced up when we go to CLDR-via-JSON in rt 69340 (no XML voo doo and we can move to TT for mod building) ##
# datetime.json
o
sh @dt_methods, $meth;
}
my @dt_available_formats = $en_dt_loc->available_formats();
# /datetime.json
use Hash::Merge;
Hash::Merge::specify_behavior(
{
'SCALAR' => {
'SCALAR'
les'}{$k}, $k );
}
my $json = JSON::Syck::Dump($guts_m); # no eval, lets just die
$json =~ s/\"(function \(n\) \{)/$1/g;
$json =~ s/(return\;\})\"/$1/g;
ope
use File::Spec::Functions qw(catfile);
use File::Basename;
use YAML::Tiny;
use Data::Dumper;
use JSON;
my @opts = qw(
help
create-config
list
command=s@
);
my %opts = (
config =>
ub _exec_kraken {
my $command = shift;
if ($kraken->can($command)) {
print JSON::encode_json($kraken->$command), $/;
return;
}
die sprintf(
"Unable to execute
e Moose;
use namespace::autoclean;
use LWP::UserAgent;
use MooseX::Types::URI qw(Uri);
use JSON qw(decode_json);
use Try::Tiny;
use MIME::Base64 3.11 qw(decode_base64url);
use Time::HiRes qw(gettimeof
r(Accept => 'application/json');
my $response = $self->ua->request($req);
if ($response->is_success) {
my $data;
try {
$data = decode_json($response->decoded_cont
ent);
}
catch {
die "Unable to decode JSON from Kraken!", $/;
};
if (@{$data->{error}}) {
if (@{$data->{error}} > 1) {
die "Mul
package Net::Domain::Parts;
use strict;
use warnings;
use Carp qw(croak);
use Data::Dumper;
use JSON;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(
domain_parts
);
our @EXPORT_OK =
TAGS{all} = [@EXPORT, @EXPORT_OK];
our $VERSION = '0.04';
my $json;
{
local $/;
$json = <DATA>;
}
my $tlds = decode_json($json);
sub domain_parts {
my ($domain_name) = @_;
if (! d
URI;
use AnyEvent::IO qw(aio_load);
use Try::Tiny;
use JSON::XS;
use Plack::MIME;
use MooseX::Types::Path::Class;
our $json = JSON::XS->new->utf8->pretty->canonical;
our @no_cache_header
(is => 'ro', isa => 'Str', required => 1);
has 'json_content' =>
(is => 'ro', isa => 'Ref', required => 0, lazy => 1, builder => '_build_json_content');
has 'params' => (is => 'ro', isa
build_base_url'
);
has 'want_json' => (
is => 'ro',
isa => 'Bool',
required => 1,
lazy => 1,
builder => '_build_want_json'
);
has 'jsonp' => (
is => 'ro',
tes
bind
cast
bindings
construct
csv-tsv-res
exists
functions
grouping
json-res
negation
project-expression
property-path
subquery
));
push(@files, qw(
a
use strict;
use Carp;
use DateTime::Format::ISO8601;
use DateTime::TimeZone;
use HTTP::Tiny;
use JSON;
use Tie::DataUUID qw{$uuid};
use XML::Spice;
use Net::DAVTalk::XMLParser;
use MIME::Base64 qw(en
LJSON - SPARQL Results JSON Serializer
=head1 VERSION
This document describes AtteanX::Serializer::SPARQLJSON version 0.035
=head1 SYNOPSIS
use Attean;
my $s = Attean->get_serializer('SPARQLJSON
AtteanX::Serializer::SPARQLJSON 0.035 {
use Moo;
use Types::Standard qw(Str);
use Encode qw(encode);
use Scalar::Util qw(blessed);
use Attean::ListIterator;
use JSON;
use namespace::clean;
sults+json');
=item C<< media_types >>
Returns a list of media types that identify the format produced by this serializer.
=cut
sub media_types {
return [qw(application/sparql-results+json)];
use JSON;
use Convert::Base64;
use File::LibMagic;
use Carp qw(confess);
use Data::Dumper;
our $VERSION = '0.17';
our $CLIENT = "Mail-JMAPTalk";
our $AGENT = "$CLIENT/$VERSION";
our $JSON = JSON->n
er and mapping between Perl hashes and JSON on the wire.
It doesn't do anything smart with specific JMAP objects.
Example:
use Mail::JMAPTalk;
use JSON;
# using basic auth
my $jtal
obId => $data->{blobId},
keywords => { '$seen' => JSON::true },
mailboxIds => { $byname{Inbox} => JSON::true },
},
},
}, "R1"], ["Email/get", {
'replace_last' => \&replace_last,
# 'smart' => \&smart,
# 'json' => \&json,
# },
# });
#}
=head2 xml_escape
Liquid filter to escape strings into formats t
s/([^-])---([^-])/$1\—$2/g;
return $input;
}
=head2 json
Turn string into json-formatted string.
=cut
use JSON;
sub json {
my $input = shift;
my $flags = {
allow_bless
ed => 1,
allow_barekey => 1,
allow_nonref => 1,
utf8 => 1,
pretty => 1
};
return to_json($input, $flags);
}
1;
:replace_last,
'smart' => \&App::Dapper::Filters::smart,
'json' => \&App::Dapper::Filters::json,
},
#ERROR => 'alloy_errors.html',
EVAL_PERL => $ENV{EV
was
tested both with and without MLDBM and with the Data::Dumper,
Storable, FreezeThaw, YAML and JSON serializers using the DBI::SQL::Nano
or the SQL::Statement engines.
=head1 QUICK START
DBD::DBM
serialization methods or
other serialization modules (e.g. L<YAML::MLDBM> or
L<MLDBM::Serializer::JSON>. You select the serializer using the
I<dbm_mldbm> attribute.
Some examples:
$dbh=DBI->connect
Requires L<YAML::MLDBM> installation.
=item JSON
Portable, fast serializer (between languages but not architectures).
Requires L<MLDBM::Serializer::JSON> installation.
=back
=head4 dbm_store_meta
=> "/path/to/dbm/databases",
dbm_type => "BerkeleyDB",
dbm_mldbm => "JSON", # use MLDBM::Serializer::JSON
dbm_tables => {
quick => {
dbm_type => "GDBM_File",
dbm_ML
_File> backend and
L<FreezeThaw> as serializer instead of the overall default L<BerkeleyDB> and
L<JSON>. B<But> all files containing the table data have to be searched in
C<< $dbh->{f_dir} >>, which r
Elevation::USGS;
use 5.008;
use strict;
use warnings;
use Carp;
use HTTP::Request::Common;
use JSON;
use LWP::UserAgent;
use Scalar::Util 1.10 qw{ blessed looks_like_number };
our $VERSION = '0.20
'https://nationalmap.gov/epqs/pqs.php';
use constant USGS_URL => 'https://epqs.nationalmap.gov/v1/json';
use constant ARRAY_REF => ref [];
use constant CODE_REF => ref sub {};
use constant HASH_REF =
parsed JSON
# returned from the NAD server.
sub _request {
my ( $self, %arg ) = @_;
# The allow_nonref() is for the benefit of {_hack_result}.
my $json = $self->{_json} ||= JSON->new()-
cpanmod => 'Glib::JSON',
[os_freebsd,
[package => 'json-glib']],
[like_debian,
[package => 'libjson-glib-dev']],
[like_fedora,
[package => 'json-glib-devel']],
[os_darwin,
[package => 'json-glib']],
],
[cpanmod => 'Glib::Object::Introspection',
[os_freebsd,
[package => 'gobject-introspection']],
[os_openbsd,
[
gs;
use 5.010;
use utf8;
use Moose;
with qw(Async::Microservice);
our $VERSION = '0.03';
has '+jsonp' => (default => '_cb');
use DateTime;
use Time::HiRes qw(time);
use AnyEvent;
use AnyEvent::Fut
me_dt) ];
}
sub POST_datetime {
my ($self, $this_req) = @_;
my $epoch = eval {$this_req->json_content->{epoch}};
if (!defined($epoch)) {
return [
405,
[],
pt: application/json"
curl "http://localhost:8085/v1/epoch" -H "accept: application/json"
curl "http://localhost:8085/v1/datetime?time_zone=local" -H "accept: application/json"
=head1 DESCRI
van Eeden
Upgrade GIMME to GIMME_V
thanks to Daniƫl van Eeden
Do not check with JSON::XS with perl-5.022 and later
thanks to H.Merijn Brand
Makefile.PL allows gcc-10 and
ame;
my $breaks_content = <<CHECK_BREAKS_header;
# this data duplicates x_breaks in META.json
my $dumped
CHECK_BREAKS_header
$breaks_content .= $no_forced_deps ? <<CHECK_BREAKS_prere
y %opt = ( quote => 1, sep => ' ' );
GetOptions( \%opt, 'sep|s=s', 'flat|flatten|f', 'quote|q!', 'json|j' ) or pod2usage(2);
gonzlog->tee_stderr(0);
gonzlog->namespace("gonzconf");
my @args = @ARGV;
$res = $res->{$a};
} else {
die "could not access the structure: $a";
}
}
if ( $opt{json} ) {
print jfreeze $res;
} elsif ( $opt{flat} && ref $res eq 'ARRAY' ) {
my $args;
if ( $op