sid) NOT NULL,
effective timestamp NOT NULL,
remark text,
stamp json
);
=head3 Stored procedures
This table also includes two stored procedures -- C<sid_at_ti
a::REST::ConnBank qw( $dbix_conn );
use App::Dochazka::REST::Model::Shared;
use Data::Dumper;
use JSON;
use Params::Validate qw( :all );
use Try::Tiny;
# we get 'spawn', 'reset', and accessors from p
;
return $status;
}
=head2 json
Instance method. Returns a JSON string representation of the schedule.
=cut
sub json {
my ( $self ) = @_;
return JSON->new->utf8->canonical(1)->encode
'};
use Package::Alias
'REST::Client'=>'Finance::IG::REST::Client'
;
use Finance::IG;
use JSON;
my $ig;
# with Testing::Record::REST::Client need correct data
$ig=Finance::IG->new(
$key}=~s/\xA3/£/g;
$p1->{$key}=~s/£-/-£/;
}
if (ref($p1->{$key}) eq 'JSON::PP::Boolean')
{
$p1->{$key}=$p1->{$key}?1:0;
}
}
$key}=~s/\xA3/£/g;
$p1->{$key}=~s/£-/-£/;
}
if (ref($p1->{$key}) eq 'JSON::PP::Boolean')
{
$p1->{$key}=$p1->{$key}?1:0;
}
prin
t and/or modify
it under the same terms as Perl itself.
=head1 SEE ALSO
=over 4
=item L<Test::Deep>
=item L<Test::Deep::JSON>
=item L<Test::Deep::Filter>
=item L<Test2::Tools::URL>
=back
=cut
post '/subscribe' => sub {
if (not validate profile => $validator) {
to_json errors;
}
};
=head1 BUGS AND LIMITATIONS
If you find one, please let me know.
=hea
};
my $JSON = JSON::MaybeXS->new->utf8->allow_nonref;
sub _safe_serialize {
my $data = shift or return 'undefined';
my $json = $JSON->encode( $data );
$json =~ s#/#\\/#g;
return $json;
}
# D
my $body = $JSON->decode($app->request->body);
my $data = eval { $handler->($app, $body, $EXECUTE) };
$data = { errors => [ { message => $@ } ] } if $@;
$app->send_as(JSON => $data);
ntly:
graphql '/graphql' => $schema => sub {
my ($app, $body, $execute) = @_;
# returns JSON-able Perl data
$execute->(
$schema,
$body->{query},
undef, # $root_value
ttps;
use DateTime qw();
use base 'SMS::Send::Driver';
use Log::LogLite;
use Text::Unidecode;
use JSON;
sub new {
my $class = shift;
my %params = @_;
my $LOG_FILE = "/var/log/bulkgate.log";
my
\%params );
if( $res->{'_rc'} == 200 ) {
my $json = decode_json($res->{'_content'});
if (defined $json->{data}->{status} && $json->{data}->{status} eq 'accepted') {
$self->
;
}
}
else {
my $json = eval { decode_json($res->{'_content'}) };
$self->log("Error " . $res->{'_rc'} . ": " . (defined $json ? $json->{error} : 'unexpected error'), 4);
C<TEST_REQUIRES>, and therefore modify the prerequisites in the user's
F<MYMETA.yml> and F<MYMETA.json> based on conditions found on the user's system.
The C<dynamic_config> field in L<metadata|CPAN:
TA_ADD> or
C<META_MERGE> Makefile arguments, and these are ignored for the generation of F<MYMETA.json>.)
=head1 SEE ALSO
=over 4
=item *
L<Dist::Zilla::Plugin::MakeMaker>
=item *
L<ExtUtils::Ma
",
details => $content
}
}
);
my $post_content = JSON::to_json( \%post_content );
RT->Logger->debug("PagerDuty POST: $post_content");
# https://devel
pt',
'application/vnd.pagerduty+json;version=2',
'Authorization',
"Token token=$token",
'Content-Type',
'application/json',
'From',
$user,
mes "prettier" so maybe map _ => - and uppercase first letter of each word?
my $return = JSON::from_json( $resp->decoded_content );
my ( $status, $msg ) = $self->TicketObj->AddCustomFieldValue
package Memento::TimeTravel;
our $VERSION = '0.15';
use strict;
use Moo;
use JSON;
use Scalar::Util qw(blessed);
use LWP::Simple;
sub find_mementos {
my ($self, $uri, $date) = @_;
unless (
avel.mementoweb.org/api/json/%s/%s",
$date, $uri;
my $mementos = get($api_call);
return undef unless defined($mementos) && length($mementos);
decode_json($mementos);
}
=head1 N
package Amon2::Plugin::Web::CpanelJSON;
use strict;
use warnings;
use Amon2::Util ();
use Cpanel::JSON::XS ();
use Scalar::Util qw(blessed);
use HTTP::SecureHeaders;
our $VERSION = "0.01";
my %DEFA
ULT_CONFIG = (
name => 'render_json',
# for security
# refs https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html#security-headers
secure_headers => {
=> '1; mode=block',
referrer_policy => 'no-referrer',
},
json_escape_filter => {
# Ref: https://cheatsheetseries.owasp.org/cheatsheets/XSS_Filter_Evasi
use 5.008009;
use strict;
use warnings;
package Types::JsonCoercions;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.001';
use Type::Library 1.004
-base,
-declare => qw( ArrayRefJ HashRefJ
JSON;
sub _code_to_load_package {
my ( $me, $pkg, $keyword ) = ( shift, @_ );
$keyword ||= 'do';
return sprintf(
'%s { require %s; q[%s] }',
$keyword,
$pkg,
$pkg,
);
}
sub _code_for_json
'$%s::JSON ||= ( %s or %s )->new',
$me,
$me->_code_to_load_package( 'JSON::MaybeXS', 'eval' ),
$me->_code_to_load_package( 'JSON::PP' ),
);
}
my $meta = __PACKAGE__->meta;
my $ToJson = $met
se v5.10;
use Carp qw/croak/;
use Mojo::Base -base;
use Mojo::UserAgent;
use Mojo::URL;
use Mojo::JSON 'j';
use Digest::SHA 'hmac_sha1';
use MIME::Base64 'encode_base64';
use URI::Escape 'uri_escape_u
= '/' . $command if $command !~ m{^/};
my $url = "https://api.twitter.com/1.1" . $command . ".json";
my $auth_str = $self->__build_auth_header($method, $url, $params);
my @extra;
if
age}" if $err->{code};
croak "Connection error: $err->{message}";
}
return $res->json;
}
sub streaming {
my ($self, $url, $params, $callback) = @_;
my $auth_str = $self->__b
nfo => 'countryInfo?',
earthquakes => 'earthquakesJSON?',
find_nearby_placename => 'findNearbyPlaceName?',
find_nearby_postalcodes
}
$i++;
}
}
return \@result;
}
sub _parse_json_result {
require JSON;
my( $self, $geonamesresponse ) = @_;
my @result;
return JSON->new->utf8->decode($geonamesresponse);
}
sub _parse
pe to determine which parse method to use.
# we accept text/xml, text/plain (how do see if it is JSON or not?)
my $mime_type = $response->headers->content_type || '';
my $body = '';
if ($response
;
use Readonly;
use Template;
use Template::Provider;
use File::ShareDir qw/dist_dir/;
use JSON qw/decode_json/;
use base qw/Exporter/;
our $VERSION = version->new('0.6.12');
our @EXPORT_OK = q
my ($arg, $value) = split /=/, $file, 2;
$default->{args}->{$arg} = eval { decode_json($value) } || $value;
}
else {
# store the "real" file
pu
params };
return responce($json);
};
sub responce {
my ($json) = @_;
if (params->{callback}) {
return params->{callback} . '(' . encode_json($json) . ');';
}
push_heade
ONS';
push_header 'Access-Control-Allow-Headers' => 'Content-Type';
return encode_json($json);
}
start;
=__END__
=head1 NAME
[% module %] - <One-line description of module's purpose>
e current user (and/or IP, and/or process ID, etc). A simple
format for the access log is JSON, where each JSON object (hash) is printed as a
single line and contains the necessary information pieces
:Long::Descriptive qw(describe_options);
use Hash::Merge::Simple qw(merge);
use JSON::MaybeXS qw(decode_json encode_json);
use Log::Log4perl qw(:easy);
use Module::Load qw(load);
use Module::Loaded qw
$instr->{decode} ];
foreach my $decoder ( @{ $decoders } ) {
if( $decoder eq 'json' ) {
my $start = index('{', $line);
my $blob = $start > 0 ? subs
$new = decode_json($blob);
1;
} or do {
my $err = $@;
TRACE("Bad JSON, error: $err\n$blob");
est::MD5 qw(md5_hex);
use Digest::SHA1 qw(sha1_hex);
use Fcntl qw(:flock);
use HTTP::Request;
use JSON::MaybeXS;
use List::Util qw(shuffle);
use Log::Log4perl qw(:easy);
use Path::Tiny;
use POSIX qw(s
eval {
$details = decode_json($r->content);
} or do {
my $error = $@;
WARN("es_version() not valid JSON: $error");
};
if( defined $d
request
$record = sprintf("%s\n%s\n",
encode_json({ index => \%meta }),
encode_json($doc),
);
}
elsif( !is_ref($doc) ) {
bj2HTML;
$Dancer2::Template::Obj2HTML::VERSION = '0.12';
use strict;
use warnings;
use Moo;
use JSON;
use HTML::Obj2HTML;
with 'Dancer2::Core::Role::Template';
has page_loc => (
is => 'rw'