=> [ qw(command uri|OPTIONAL) ],
},
require_modules => {
'Metabrik::String::Json' => [ ],
'Metabrik::String::Parse' => [ ],
},
};
}
#
# http://www.cve.mitre.or
rn $self->log->error("check_cve_2015_1427_rce: no content found");
my $sj = Metabrik::String::Json->new_from_brik_init($self) or return;
my $ref = $sj->decode($content) or return;
if ($ref
$self->log->error("exploit_cve_2015_1427_rce: no content found");
my $sj = Metabrik::String::Json->new_from_brik_init($self) or return;
my $ref = $sj->decode($content) or return;
if ($ref
query => [ qw(query index|OPTIONAL type|OPTIONAL) ], # Inherited
from_json_file => [ qw(json_file index|OPTIONAL type|OPTIONAL) ], # Inherited
from_dump_file => [ qw(dump_f
nds => {
install => [ ], # Inherited
stdin_to_stdout => [ ],
stdin_to_json => [ ],
test_filter_against_string => [ qw(filter_file string|string_list) ],
t
to_json {
my $self = shift;
my $binary = $self->get_binary or return;
my $cmd = "$binary -e 'input { stdin { } } output { stdout { codec => json } }'";
$self->log->info("stdin_to_json:
ONAL) ],
match_phrase => [ qw(kv index|OPTIONAL type|OPTIONAL) ],
from_json_file => [ qw(json_file index|OPTIONAL type|OPTIONAL) ],
from_dump_file => [ qw(dump_file index|OP
pe);
}
sub from_json_file {
my $self = shift;
my ($file, $index, $type) = @_;
$index ||= $self->index;
$type ||= $self->type;
$self->brik_help_run_undef_arg('from_json_file', $file) o
lp_run_file_not_found('from_json_file', $file) or return;
$self->brik_help_set_undef_arg('from_json_file', $index) or return;
$self->brik_help_set_undef_arg('from_json_file', $type) or return;
se Test::More;
use File::Basename qw(dirname);
use IPC::Open3;
use MVC::Neaf::Util qw(JSON encode_json decode_json);
my $lib = dirname(__FILE__)."/../lib";
my $pid = open3( \*SKIP_IN, \*CGI_OUT, \*C
use warnings;
use Test::More;
use File::Basename qw(dirname);
use MVC::Neaf::Util qw(JSON encode_json decode_json);
my $perl = $^X;
my $root = dirname(__FILE__)."/..";
my $script = "$root/example
.0) Gecko/20100101 Firefox/5.0";
$ENV{PATH_INFO}="/02/request/and/beyond";
$ENV{QUERY_STRING}="as_json=1";
$ENV{REMOTE_ADDR}="127.0.0.1";
$ENV{REMOTE_PORT}="63555";
$ENV{REQUEST_METHOD}="GET";
$ENV{RE
like $rawhead, qr/^Status: 200\s/s, "Status = 200";
like $rawhead, qr/Content-Type: application\/json/, "Content type present";
my %head = split /:\s*|\s*\n/, $rawhead;
is $head{'Content-Length'},
"boolean" "JSON::PP"))>
Create a new C<YAML::PP::Perl> object. The C<.> after the module name is like calling the C<->new> in Perl.
=item * C<(def y-pp (.new YAML.PP.Perl "boolean" "JSON::PP"))>
C
# Returns XML by default
my $events = $sk->get_events;
# Or returns JSON
my $events = $sk->get_events({ format => 'json' });
=head1 DESCRIPTION
This module presents a Perl wrapper around the
use strict;
use warnings;
our $VERSION = '1.0.8';
use Moose;
use LWP::UserAgent;
use URI;
use JSON;
use Net::Songkick::Event;
has api_key => (
is => 'ro',
isa => 'Str',
required => 1,
);
shift;
return LWP::UserAgent->new;
}
has json_decoder => (
is => 'ro',
isa => 'JSON',
lazy_build => 1,
);
sub _build_json_decoder {
return JSON->new;
}
has ['api_format', 'return_format'
package License::SPDX;
use strict;
use warnings;
use Class::Utils qw(set_params);
use Cpanel::JSON::XS;
use Error::Pure qw(err);
use File::Share ':all';
use List::Util qw(first);
use Perl6::Slurp qw
ses.
open my $data_fh, '<', dist_dir('License-SPDX').'/licenses.json';
my $data = slurp($data_fh);
$self->{'licenses'} = Cpanel::JSON::XS->new->ascii->pretty->allow_nonref->decode($data);
# Load
my $data_exc_fh, '<', dist_dir('License-SPDX').'/exceptions.json';
my $data_exc = slurp($data_exc_fh);
$self->{'exceptions'} = Cpanel::JSON::XS->new->ascii->pretty->allow_nonref->decode($data_exc);
Fast;
use Time::HiRes ();
use Sys::Hostname ();
use Digest::MD5 qw(md5);
use MVC::Neaf::Util qw( JSON http_date run_all_nodie canonize_path encode_b64 );
use MVC::Neaf::Upload;
use MVC::Neaf::Excepti
B<WARNING> Encodings other than UTF-8 are not supported as of yet.
=head2 body_json()
Get decoded request body in JSON format.
In case of errors, error 422 is thrown.
=head2 body_raw()
Returns req
ntent_type
return decode_utf8( $self->body_raw );
});
my $codec = JSON->new->utf8->allow_nonref;
_helper_fallback( body_json => sub {
my ($self, $validator) = @_;
# TODO add validator su
$url->query(
idsite => ref $site_id ? $site_id->[0] : $site_id,
format => 'JSON'
);
$url->query({token_auth => $token_auth}) if $token_auth;
}
# An
$url->query(
module => 'API',
method => $method,
format => 'JSON',
idSite => ref $site_id ? join(',', @$site_id) : $site_id,
token_auth => $to
pi_url($method, $param)
or return;
return $url if $api_test;
# Todo: Handle json errors!
# Blocking
unless ($cb) {
my $tx = $plugin->ua->get($url);
tractForm';
use CallBackery::Translate qw(trm);
use CallBackery::Exception qw(mkerror);
use Mojo::JSON qw(true false);
use POSIX qw(strftime);
=head1 NAME
<%= ${class} %>::GuiPlugin::SongForm - Son
eation history, these two functions are intended to be used by data
serialisation modules such as JSON encoders or similar situations, where
language interoperability concerns require making a distinc
lement,
and the location (if any) as its one and only C<< <i> >> element.
This page used to be a JSON but it turned out hard to debug
when dealing with javascript.
=cut
sub make_reply {
my ($se
file} line $self->{-line}"
: ''
};
=head2 TO_JSON()
Converts exception to JSON, so that it doesn't frighten View::JS.
=cut
sub TO_JSON {
my $self = shift;
return { %$self };
};
=h
eb::LocalData::VERSION = '1.1.0';
use strict;
use warnings;
use 5.012;
use kateb::FontInfo;
use JSON::PP;
use File::Temp;
use File::Path qw(make_path rmtree);
use File::Spec;
use File::Spec::Functio
";
#----------------------- GLOBAL VARIABLES -----------------------#
# create empty envs
my $json_file;
# Home directory
my $home_dir = $ENV{HOME} || $ENV{LOGDIR} || (getpwuid $<)[7] || `echo
my $config_file = catfile($config_dir, "$execname.conf");
# json Database file
my $json_data_file = catfile($config_dir, "$execname.json");
# check for exist config dir
if (not -d $config_dir)
ateb::Install::VERSION = '1.1.0';
use strict;
use warnings;
use 5.012;
use kateb::FontInfo;
use JSON::PP;
use HTTP::Tinyish;
use URI ();
use File::Spec::Functions qw(catdir catfile tmpdir
;
my @fonts = @{$self->{fonts}};
my $info = kateb::FontInfo->new;
my $json_file = $local_data->{jsonFile};
my @check;
foreach my $font_name (@fonts)
{
my $version = _online_versi
name, $local_data, $version);
}
kateb::LocalData->write_data($local_data->{installedVersions}, $json_file);
say "\nto update fonts:
$c{bblue}kateb update @check$c{reset}" if @check;
# my @fc_cac
/Manifest.json' => 'frontend/Manifest.json',
'frontend/compile.json' => 'frontend/compile.json',
'frontend/compile.js' => 'frontend/compile.js',
'frontend/package.json' => 'fro
ntend/package.json',
'frontend/source/boot/index.html' => 'frontend/source/boot/index.html',
'frontend/source/class/app/Application.js' => 'frontend/source/class/'.$self->class_file.'/
e HTML::Valid::Tagset ':all';
use JSON::Parse '0.62', 'read_json';
my $dir = __FILE__;
$dir =~ s/Make\.pm/Make/;
my $infofile = "$dir/info.json";
my $info = read_json ($infofile);
# This is a list o
%>');
$t->post_ok('/QX-JSON-RPC',json => {id => 1,service => 'default', method => 'ping'})
->status_is(200)
->content_type_is('application/json; charset=utf-8')
->json_is({id => 1,result => "p
#!/home/ben/software/install/bin/perl
use Z;
use MetaCPAN::Client;
use JSON::Create 'create_json';
use Perl::Build::Pod ':all';
# Read the file in & extract the section
my $text = see_also ("$Bin/l
info{fav} = $fav->total ();
push @modules, \%info;
}
};
if ($@) {
print "error: $@";
}
my $mtext = create_json (\@modules, sort => 1, indent => 1);
write_text ("see-also-info.json", $mtext);