hareDir;
# --------------
my($app_name) = 'MarpaX-Grammar-GraphViz2';
my($bnf_name) = shift || 'json.1';
$bnf_name .= '.bnf';
my($path) = File::ShareDir::dist_file($app_name, $bnf_name);
pr
on;
use strict;
use Moo::Role;
use JSON::XS;
use vars qw($VERSION);
$VERSION = '0.06';
sub decode_response {
my( $self, $body ) = @_;
return decode_json( $body );
}
sub process_response
nd $code <= 209 ) {
if ( defined $body and length $body ) {
# Let's hope it's JSON
$body = $self->decode_response($body)
if $is_encoded;
ret
(
"Content-Length" => $content_size,
"Accept" => 'application/json,text/plain',
@headers
);
my $p = deferred;
http_reque
lib';
use Apache::Tika::Server;
use Dancer::SearchApp::HTMLSnippet;
use JSON::MaybeXS;
my $true = JSON->true;
my $false = JSON->false;
=head1 USAGE
# index a directory and its subdirectories
in
-file '/etc/passwd' --html '<html><pre>machine user list password</pre></html>'
submit-url --json '{ url: "", "content" : "", ... }'
This allows for custom handling of single entries
Detect "ge
heckSummaryOfTheSubmittedDocument;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::
# return perl hash
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
fo
deserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
t;
# ABSTRACT: User Agent Role for DigitalOcean WebService
use Moo::Role;
use LWP::UserAgent;
use JSON ();
use DateTime;
use Types::Standard qw/is_HashRef/;
use utf8;
our $VERSION = '0.026'; # VERSIO
= (
'Authorization' => 'Bearer ' . $self->token,
'Content-Type' => 'application/json; charset=utf-8',
);
my $ua = LWP::UserAgent->new(
agent => 'WebService
) = @_;
my $full_url = $self->api_base_url . $uri;
my $encoded_data = $data ? JSON::encode_json($data) : undef;
my $headers = undef;
return HTTP::Request->new( $method, $fu
erl::Client::Object::ControlGroup;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::
# return perl hash
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
f
deserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
Perl::Client::Object::GenericData;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::
# return perl hash
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
f
deserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
ld').", Child_id=".$self->param('child_id'))
# if ($self->param('child'));
$self->render( json => {'<%=$class %>-<%=$action%>'=>'Stub!',id=>$self->param('id'),child_id=>$self->param('child_id'
s/Corion/Projekte/Apache-Tika-Async/lib';
use Apache::Tika::Server;
use JSON::MaybeXS;
my $true = JSON->true;
my $false = JSON->false;
=head1 USAGE
# index a directory and its subdirectories
in
ndex %indices %analyzers );
use Dancer::SearchApp::Utils qw(await);
use JSON::MaybeXS;
my $true = JSON->true;
my $false = JSON->false;
GetOptions(
'force|f' => \my $force_rebuild,
'config|c:
MAC_SHA1 qw(hmac_sha1);
use MIME::Base64;
use URI::Escape qw/uri_escape/;
use Carp qw/croak/;
use JSON;
sub new {
my $class = shift;
my %params = @_ % 2 ? %{$_[0]} : @_;
$params{api_key}
ncode_json($data)) if $data;
# print Dumper(\$req); use Data::Dumper;
my $res = $self->{ua}->request($req);
if ($res->header('Content-Type') =~ 'json') {
return decode_json($res-
="hmac-sha1",headers="date x-mod-nonce",signature="$sig"~,
"Content-Type" => "application/json;charset=UTF-8",
];
}
1;
__END__
=encoding utf-8
=head1 NAME
WWW::ModulrFinance - Modulr A
dcheckioPerl::Client::Object::Mrz;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::
# return perl hash
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
f
deserialize the data
while ( my ($_key, $_type) = each %{$self->swagger_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
if ($_type =~ /^array\[/i) { # array
nghita/Mobile-Detect/blob/master/Mobile_Detect.json
#
use 5.006;
use strict;
no strict "subs";
use warnings FATAL => 'all';
no warnings qw/misc/;
use JSON;
use LWP::Protocol::https;
use LWP::UserAgent
;
use constant JSON_REMOTE_FILE => 'https://raw.githubusercontent.com/serbanghita/Mobile-Detect/master/Mobile_Detect.json';
use constant JSON_LOCAL_FILE => '/var/tmp/Mobile_Detect.json';
use constan
detect_mobile_ua);
sub new {
my($class, %args) = @_;
my $self = bless({}, $class);
my $json = JSON->new();
my $filestamp = 0;
my $filesize = 0;
my %hashfile;
my $hash;
if (-e HASH_LOC
dynamic prereqs to the included modules list (if we can)
my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
if ($source and $has_cpan_meta) {
if (my $meta = eval { CPAN::Meta->load_file
kely, manually encoding to JSON would be the saner approach
# instead of globally setting a serializer for all routes.
set 'serializer' => 'JSON';
get '/suggest/:query.json' => sub {
my( $q ) = p
package CORION::Apache::Tika;
use strict;
use Moo;
use JSON::XS qw(decode_json);
use vars '$VERSION';
$VERSION = '0.06';
=head1 NAME
CORION::Apache::Tika - connect to Apache::Tika
=head1 SYNOPSIS
@_;
$line =~ m!"([^"]+)"!g;
}
sub get_meta {
my( $self, $file )= @_;
#return decode_json($self->fetch( filename => $file, type => 'meta' ));
# Hacky CSV-to-hash decode :-/
return
s the DigitalOcean RESTful API (v2)
use Moo;
use Types::Standard qw/Str/;
use LWP::UserAgent;
use JSON ();
use DateTime;
use utf8;
with
'WebService::DigitalOcean::Role::UserAgent',
'WebServic
AccessLog::Structured::ZeroMQ is a
L<Plack::Middleware|Plack::Middleware> which sends structured, JSON-encoded log
messages into a ZeroMQ message queue. It is a subclass of
L<Plack::Middleware::Access