e 0.16; #Polygon
=head1 NAME
Geo-GoogleEarth-Pluggable-Plugin-AsGeoJSON-example.pl - Geo::GoogleEarth::Pluggable::Plugin:AsGeoJSON Examaple
=head2 Configuration
Update the PostgreSQL connetion inf
isdata = $database->sqlarrayhash(&gis_data_sql);
foreach my $row (@gisdata) {
$document->AsGeoJSON(%$row);
}
print $document->render;
sub gis_data_sql {
return qq{
SELECT 'LineString'
ST_AsGeoJSON(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)')) AS "json" /* alias column for function here */
UNION ALL
SELECT 'LineString', ST_AsGeoJSON(ST_GeomFro
mple script on how to use IMDB::JSON to lookup movie data
# against the internet movie database (www.imdb.com)
use IMDB::JSON;
use Data::Dumper;
my $IMDB = IMDB::JSON->new;
if($ARGV[0] =~ /^(tt\d+)
use strict;
use warnings;
package JSON::Schema::Draft201909::Utilities;
# vim: set ts=8 sts=2 sw=2 tw=100 et :
# ABSTRACT: (DEPRECATED) Internal utilities for JSON::Schema::Draft201909
our $VERSION =
es';
use strictures 2;
use JSON::Schema::Modern::Utilities;
use namespace::clean;
use Import::Into;
sub import {
my ($self, @functions) = @_;
my $target = caller;
JSON::Schema::Modern::Utilitie
JSON::Schema::Draft201909::Utilities - (DEPRECATED) Internal utilities for JSON::Schema::Draft201909
=head1 VERSION
version 0.130
=head1 DESCRIPTION
This module is deprecated in favour of L<JSON:
rmat, LTSV format, and JSON5 format. Each record has the following
fields.
--------------------------------------------------------------
LTSV-label
CSV-col JSON5-label meanings
--
when-towhich-who.csv
LOG/when/towhich/when-towhich-who.ltsv
LOG/when/towhich/when-towhich-who.json5
-----------------------------------------------------
=head1 AUTHOR
INABA Hitoshi E<lt>ina@c
Geo::GoogleEarth::Pluggable::Plugin::AsGeoJSON;
use strict;
use warnings;
use Geo::GoogleEarth::Pluggable 0.16; #for Polygon and MultiPolygon support
use JSON::XS qw{};
our $VERSION = '0.05';
our $PA
Plugin::AsGeoJSON - PostgreSQL ST_AsGeoJSON plugin for Geo::GoogleEarth::Pluggable
=head1 SYNOPSIS
use Geo::GoogleEarth::Pluggable;
use Geo::GoogleEarth::Pluggable::Plugin::AsGeoJSON; #can be ru
$object = $document->AsGeoJSON(name => $text,
description => $html,
json => $json_string,
trict;
use warnings;
package JSON::Schema::Draft201909::Annotation;
# vim: set ts=8 sts=2 sw=2 tw=100 et :
# ABSTRACT: (DEPRECATED) Contains a single annotation from a JSON Schema evaluation
our $VER
extends 'JSON::Schema::Modern::Annotation';
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
JSON::Schema::Draft201909::Annotation - (DEPRECATED) Contains a single annotation from a JSON Schema eva
is module is deprecated in favour of L<JSON::Schema::Modern::Annotation>.
=head1 SUPPORT
Bugs may be submitted through L<https://github.com/karenetheridge/JSON-Schema-Draft201909/issues>.
I am also
eConstraints;
use Path::Class qw();
use Path::Class::Iterator;
use MooseX::Storage::Format::JSONpm;
use JSON::XS;
our $HOUR_RE = qr/(?<hour>[012]?\d)/;
our $MINUTE_RE = qr/(?<minute>[0-5]?\d)/;
our
my $self = shift;
my $file = $self->home->file('projects.json');
return unless -e $file && -s $file;
my $decoder = JSON::XS->new->utf8->pretty->relaxed;
my $projects = $decoder->d
arnings;
use HTML::Entities qw(decode_entities);
use HTTP::Request::Common qw(GET);
use JSON qw(decode_json);
use LWP::UserAgent;
use Moo;
use MooX::StrictConstructor;
use URI;
use namespace::
or die $response->status_line, "\n";
my $json = decode_json( $response->decoded_content );
$json->{responseStatus} eq '200'
or die $json->{responseDetails}, "\n";
# Not clear
why decode_entities here.
# Looks like bad interface.
return decode_entities( $json->{responseData}->{translatedText} );
}
__PACKAGE__->meta->make_immutable;
1;
__END__
=head1
build_tree_from_struct($structs[0]);
}
# TODO: option to parse each line as CSV line, LTSV line, JSON, or Perl hash for
# greater flexibility.
1;
# ABSTRACT: Build a tree object from lines of text,
ime::Format::Duration;
use User::pwent;
use MooseX::Storage;
with Storage(
format => [ JSONpm => { json_opts => { pretty => 1, canonical => 1 } } ],
io => "File",
);
MooseX::Storage::Eng
acker::Data::Task;
use App::TimeTracker::Proto;
use DateTime;
use Path::Class;
use Try::Tiny;
use JSON::XS;
use Path::Class;
$|=1;
my $app = App::TimeTracker::Proto->new;
my @files = File::Find::Rule
>home );
foreach my $old (@files) {
print '.';
my $json_old = Path::Class::File->new($old)->slurp;
my $hash = decode_json($json_old);
if ($hash->{project} && ref($hash->{project}) eq
}
else {
push(@new_tags,$t);
}
}
$hash->{tags}=\@new_tags;
}
open(my $out,">",$old);
print $out encode_json($hash);
}
rp 'croak';
use List::Util qw( shuffle );
use List::MoreUtils qw( uniq );
use LWP::UserAgent;
use JSON::PP;
use utf8;
use Geonode::Free::Proxy;
=head1 NAME
Geonode::Free::ProxyList - Get Free Geono
0;
return;
}
sub _create_proxy_list {
my ( $self, $struct ) = @_;
$struct = decode_json $struct;
my %proxies = map { $_->id => $_ } $self->get_all_proxies;
for my $item ( @{ $
self, $cwd ) = @_;
$cwd ||= Path::Class::Dir->new->absolute;
if ( -e $cwd->file('.tracker.json') ) {
error_message(
"This directory is already set up.\nTry 'tracker show_co
->file('.tracker.json')->openw;
say $fh <<EOCONFIG;
{
"project":"$project"
}
EOCONFIG
my $projects_file = $self->home->file('projects.json');
my $coder = JSON::XS->new->utf8->
->file('.tracker.json')->absolute->stringify;
$projects_file->spew( $coder->encode($projects) );
}
say "Set up this directory for time-tracking via file .tracker.json";
}
sub cmd_plu
MooseX::Types::Path::Class;
use File::HomeDir ();
use Path::Class;
use Hash::Merge qw(merge);
use JSON::XS;
use Carp;
use Try::Tiny;
use App::TimeTracker::Data::Task;
use App::TimeTracker::Constants q
file_locations( {} );
my $fh = $self->global_config_file->openw;
print $fh $self->json_decoder->encode( {} );
close $fh;
}
return $home;
}
has 'global_config_file' =>
,
);
sub _build_global_config_file {
my $self = shift;
return $self->home->file('tracker.json');
}
has 'config_file_locations' => (
is => 'ro',
isa => 'HashRef',
l
use MIME::Base64 qw(encode_base64);
use LWP::UserAgent ();
use URI ();
use JSON::MaybeXS qw/decode_json/;
use Scalar::Util qw/blessed/;
use Encode qw/encode/;
use constant MIME_
cation/json is often not correctly configured: is not
# (yet) an apache pre-configured extension :(
if(my $params = eval {decode_json $content} )
{ # content is JSON
ngs;
use GraphQL::Schema;
use GraphQL::Plugin::Type::DateTime;
use GraphQL::Debug qw(_debug);
use JSON::Validator;
use OpenAPI::Client;
our $VERSION = "0.22";
use constant DEBUG => $ENV{GRAPHQL_DEBUG
die $res->body."\n" if $res->is_error;
my $json = $res->json;
DEBUG and _debug('OpenAPI.resolver(got)', $json);
my $return_type = $info->{return_type};
eturn_type->to_string}{is_hashpair}) {
$json = [ map {
+{ key => $_, value => $json->{$_} }
} sort keys %{$json || {}} ];
}
DEBUG and _debug('
002';
use HTTP::Thin;
use HTTP::Request::Common qw/GET DELETE PUT POST/;
use HTTP::CookieJar;
use JSON;
use URI;
use Ouch;
use Moo;
=head1 NAME
WebService::GoShippo - A simple client to L<Shippo's R
JSON
When making a request like:
$tj->post('customers', { customer_id => '27', exemption_type => 'non_exempt', name => 'Andy Dufresne', });
The data in POST request will be translated to JSON
using <JSON::to_json> and encoded to UTF8.
=item Response data is deserialized from JSON and returned from each call.
=back
=head1 EXCEPTIONS
All exceptions in C<WebService::GoShippo> are handled
t;
our $VERSION; # to be able to test in devel environment
use Carp qw(croak);
use JSON::MaybeXS qw/encode_json/;
# Attributes to be saved to preserve the session.
my @session = qw/access_token to
ned $refresh;
$token;
}
#--------------
sub to_json()
{ my $self = shift;
encode_json $self->session_freeze;
}
*to_string = \&to_json; # until v0.50
sub session_freeze(%)
{ my ($self
get($request);
my $response = $session->get($header, $content);
print $session->to_string; # JSON
# probably better to set new(auto_refresh), but you may do:
$session->refresh if $session->e
you store this in a
MySQL database. Perl's JSON module will output utf8 by default.
=item $obj-E<gt>B<to_json>()
Freeze this object into JSON. The JSON syntax is also used by the OAuth2
protocol,
package Net::Dimona;
use strict;
use warnings;
use LWP::UserAgent;
use JSON::MaybeXS qw( encode_json decode_json );
our $VERSION = 0.02;
sub new {
my ($class, %params) = @_;
die 'api_key req
=> 'application/json',
'Content-Type' => 'application/json',
($params ? ('Content' => encode_json($params)) : ())
);
my $data;
eval { $data = decode_json($res->decoded_co