s_av); i++) {
char* path = 0;
char* source = 0;
char* mapjson = 0;
char* error_msg = 0;
size_t error_line = -1;
size_t e
SV** source_sv = len < 1 ? 0 : av_fetch(import_av, 1, false);
SV** mapjson_sv = len < 2 ? 0 : av_fetch(import_av, 2, false);
SV** error_msg_sv = len < 3 ?
(*source_sv)) source = SvPV_nolen(*source_sv);
if (mapjson_sv && SvOK(*mapjson_sv)) mapjson = SvPV_nolen(*mapjson_sv);
if (error_msg_sv && SvOK(*error_msg_sv)) error_
is I<not> suitable for protecting documents which
require context outside of the protected area. JSON and YAML would be good
examples of document types which are probably not suitable for this code.
ce::autoclean;
use autodie;
use Carp;
use File::Basename 'fileparse';
use File::Temp;
use JSON::Parse 'json_file_to_perl';
use POSIX 'ceil';
use XML::Bare;
use XML::Hash::XS;
use aliased 'Bio::Pala
my $js = $self->file;
my $json = File::Temp->new(suffix => '.json');
open my $in, '<', $js;
chomp( my @lines = <$in> );
open my $out, '>', $json->filename;
for my $i (0 .. @l
$out;
open my $in2, '<', $json->filename;
while (my $line = <$in>){
print $line;
}
my $root = json_file_to_perl($json->filename);
my %json_for;
my ($cluster_id, $gen
11';
use autodie;
use Getopt::Euclid qw(:vars);
use JSON::Create qw(create_json);
use aliased 'Bio::Palantir::Explorer::ClusterFasta';
my (%json_for, $i);
my $cluster = ClusterFasta->new( file =>
@lines;
GENE:
for my $gene (sort { $a->rank <=> $b->rank } $cluster->all_genes) {
$json_for{'no-taxonomy'}{Clusters}{++$i}{GenesPlus}{$gene->rank} = {
# uui => $gene
ubtype_evalue // 'NULL';
my $subtype_score = $domain->subtype_score // 'NULL';
$json_for{'no-taxonomy'}{Clusters}{$i}{GenesPlus}{$gene->rank}{'Do'
. 'mainsPlus'}{$domain->ran
package Jenkins::API;
use Moo;
use Types::Standard -types;
use JSON;
use MIME::Base64;
use URI;
use REST::Client;
use HTTP::Status qw(HTTP_CREATED HTTP_FOUND HTTP_OK);
# ABSTRACT: A wrapper around t
f = shift;
return $self->_json_api(['queue', 'api','json'], @_);
}
sub load_statistics
{
my $self = shift;
return $self->_json_api(['overallLoad', 'api','json'], @_);
}
sub get_job_detai
name = shift;
return $self->_json_api(['job', $job_name, 'api', 'json'], @_);
}
sub current_status
{
my $self = shift;
return $self->_json_api(['api','json'], @_);
}
sub view_status
{
my $cluster_rank = 1;
# fix for antismash5: cluster order is not preserved during json2xml conversion
my $cluster_list;
unless (
grep { $_->{genecluster}->{sequence}->
Plack::Util::Accessor qw(logger callback extra_field);
use Net::Domain qw(hostname hostfqdn);
use JSON;
sub new {
my ($class, $arg_ref) = @_;
my $self = $class->next::method($arg_ref);
if (defin
ogger = $self->logger() || sub { $env->{'psgi.errors'}->print($_[0] . "\n") };
$logger->(encode_json($log_entry));
return;
});
}
# Taken from Plack::Middleware::AccessLog
sub _safe {
my ($str
e example is used with a basic L<PSGI|PSGI> application that simply
returns C<ok>, the following, JSON-encoded message would be logged (on one log
line):
{
"remote_addr": "127.0.0.1",
"request_m
package PawsX::Waiter;
use strict;
use warnings;
use Moose::Role;
use JSON;
use Path::Tiny;
use PawsX::Waiter::Client;
our $VERSION = "0.03";
sub GetWaiter {
my ( $self, $waiter ) = @_;
m
_FILE__)->parent->child('Waiter/waiters.json');
my $service = lc $self->service;
my $definition = $waiter_file->slurp();
my $waiter_struct = JSON->new->utf8(1)->decode($definition);
t_get_error_status (struct Sass_Context* ctx);
ADDAPI const char* ADDCALL sass_context_get_error_json (struct Sass_Context* ctx);
ADDAPI const char* ADDCALL sass_context_get_error_text (struct Sass_
ownership of memory (value on context is set to 0)
ADDAPI char* ADDCALL sass_context_take_error_json (struct Sass_Context* ctx);
ADDAPI char* ADDCALL sass_context_take_error_text (struct Sass_Conte
ts => [ 'CfnMutability' ], mutability => 'Mutable');
has ResourcePolicy => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutabi
=> [ 'CfnMutability' ], mutability => 'Immutable');
has PolicyDocument => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutabi
=> 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
has Tags => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutabl
=> 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
has Tags => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutabl
raits => [ 'CfnMutability' ], mutability => 'Mutable');
has CostFilters => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutabl
[ 'CfnMutability' ], mutability => 'Mutable');
has PlannedBudgetLimits => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immuta
:StrictConstructor;
extends 'Cfn::Value::TypedValue';
has Manifest => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutabl
', as 'Cfn::Value';
subtype 'Cfn::Value::Timestamp', as 'Cfn::Value';
subtype 'Cfn::Value::Json', as 'Cfn::Value';
coerce 'Cfn::Value::Boolean',
from 'Int', via {
my $val = $_
ect', via {
my $val = $_;
die "Cannot coerce a boolean from a non JSON::PP::Boolean" if (not $val->isa('JSON::PP::Boolean'));
if ($val == 1) {
Cfn::Boolean->new( Value => 1,
w( Value => $_ ) },
from 'HashRef', via \&coerce_hashref_to_function;
subtype 'Cfn::Value::Json',
as 'Cfn::Value::Hash';
coerce 'Cfn::Value::Array',
from 'HashRef', via (\&coerce_ha
e App::jsonsel;
our $DATE = '2021-02-19'; # DATE
our $VERSION = '0.008'; # VERSION
use 5.010001;
use strict;
use warnings;
use App::CSelUtils;
our %SPEC;
sub _encode_json {
state $json = do {
re JSON::MaybeXS;
JSON::MaybeXS->new(allow_nonref=>1, canonical=>1);
};
$json->encode($_[0]);
}
sub _decode_json {
state $json = do {
require JSON::MaybeXS;
JSON::
MaybeXS->new(allow_nonref=>1, canonical=>1);
};
$json->decode($_[0]);
}
$SPEC{jsonsel} = {
v => 1.1,
summary => 'Select JSON elements using CSel (CSS-selector-like) syntax',
args
ts => [ 'CfnMutability' ], mutability => 'Mutable');
has PolicyDocument => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutabi
e 'Cfn::Resource::Properties::AWS::WAFv2::WebACL::JsonMatchPattern',
as 'Cfn::Value';
coerce 'Cfn::Resource::Properties::AWS::WAFv2::WebACL::JsonMatchPattern',
from 'HashRef',
via {
if
rce::Properties::Object::AWS::WAFv2::WebACL::JsonMatchPattern->new( %$_ );
}
};
package Cfn::Resource::Properties::Object::AWS::WAFv2::WebACL::JsonMatchPattern {
use Moose;
use MooseX::St
rictConstructor;
extends 'Cfn::Value::TypedValue';
has All => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
h
aits => [ 'CfnMutability' ], mutability => 'Immutable');
has Parameters => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutabi