value($schema);
if ($keyword_value) {
$context->json->canonical(1);
my @unique = uniq map {
$context->json->encode($_)
} @$instance;
if (scalar @uniqu
e != scalar @$instance) {
$context->log_error("The instance array is not unique");
}
$context->json->canonical(0);
}
}
1;
e JSV::Keyword::Draft4::Type;
use strict;
use warnings;
use parent qw(JSV::Keyword);
use B;
use JSON;
use List::Util qw(first);
use Scalar::Util qw(blessed);
use JSV::Keyword qw(:constants);
sub i
ackage JSV::Keyword::Draft4::Minimum;
use strict;
use warnings;
use parent qw(JSV::Keyword);
use JSON;
use JSV::Keyword qw(:constants);
sub instance_type() { INSTANCE_TYPE_NUMERIC(); }
sub keyword(
value($schema);
my $exclusive_minimum = $class->keyword_value($schema, "exclusiveMinimum") || JSON::false;
if ($exclusive_minimum) {
if ($instance <= $minimum) {
$context-
;
BEGIN { extends 'Catalyst::Controller' }
use JSON;
use Try::Tiny;
use namespace::autoclean;
__PACKAGE__->config(
'default' => 'application/json',
'stash_key' => 'response',
'map'
=> {
'application/x-www-form-urlencoded' => 'JSON',
'application/json' => 'JSON',
}
);
has 'root' => (
is => 'ro',
isa => 'Str',
default =
e} = {
"error" => "Failed to open directory '$full_path'",
"success" => JSON::false,
};
$c->detach('serialize');
};
my $regexp = $self->filter;
@
V::Keyword);
use JSV::Keyword qw(:constants);
use JSV::Util::Type qw(detect_instance_type escape_json_pointer);
sub instance_type() { INSTANCE_TYPE_OBJECT(); }
sub keyword() { 'properties' }
sub add
nstance) {
local $context->{current_pointer} = $context->{current_pointer} . "/" . escape_json_pointer( $property );
if (exists $properties->{$property}) {
local $context-
nt_schema_pointer} =
$context->{current_schema_pointer} . "/properties/" . escape_json_pointer( $property );
$context->validate($properties->{$property}, $instance->{$prope
tions;
use JSON::XS;
use Moo;
our $VERSION = "1.01";
use constant {
REF_DB_PATH => catfile(dirname($INC{"Schema/RackTables.pm"}),
"RackTables", "versions.json")
};
has
s schema => ( is => "ro" );
has schema_version => ( is => "ro" );
my $ref_db = decode_json(do {
open my $fh, "<", REF_DB_PATH or die "Can't read '", REF_DB_PATH, "': $!\n";
local $
ERSION = '0.15';
use warnings;
use strict;
our $DEBUG = 0;
use Any::Moose;
use HTTP::Request;
use JSON;
use YAML;
use Carp;
has 'cloudservers' =>
(is => 'rw', isa => 'Net::RackSpace::CloudServers
response->code
unless scalar grep { $response->code eq $_ } (200, 203);
my $hr = from_json($response->content);
warn Dump($hr) if $DEBUG;
#{"limits":{"absolute":{"maxTotalRAMSize":512
oudServers::Limits;
use LWP::ConnCache::MaxKeepAliveRequests;
use LWP::UserAgent::Determined;
use JSON;
use YAML;
use Carp;
our $DEBUG = 0;
has 'user' => (is => 'ro', isa => 'Str', required => 1)
s scalar grep { $response->code eq $_ } (200, 203);
my @servers;
my $hash_response = from_json($response->content);
warn Dump($hash_response) if $DEBUG;
# {"servers":[{"name":"test00"
ode
unless scalar grep { $response->code eq $_ } (200, 203);
my $hash_response = from_json($response->content);
warn Dump($hash_response) if $DEBUG;
confess 'response does not con
ngs;
use parent qw(JSV::Keyword);
use JSV::Keyword qw(:constants);
use JSV::Util::Type qw(escape_json_pointer);
use List::Util qw(first);
sub instance_type() { INSTANCE_TYPE_OBJECT(); }
sub keyword(
. "/" . escape_json_pointer( $property );
local $context->{current_schema_pointer} =
$context->{current_schema_pointer} . "/" . $class->keyword . "/" . escape_json_pointer( $prope
G}, 'Smart::Comments';
use WWW::AUR::URI qw(rpc_uri);
use WWW::AUR::UserAgent;
use IO::Pipe;
use JSON;
=head1 NAME
OS::CheckUpdates::AUR - checkupdates for aur
=head1 VERSION
Version 0.04
=cut
ponse = $lwp->get(rpc_uri('multiinfo', @_));
$response->is_success
and return decode_json($response->decoded_content);
### LWP decoded: $response->decoded_content
$!=1; die(__PA
ERSION = '0.15';
use warnings;
use strict;
our $DEBUG = 0;
use Any::Moose;
use HTTP::Request;
use JSON;
use YAML;
use Net::RackSpace::CloudServers::Image;
use Carp;
has 'cloudservers' =>
(is => '
th-Token' => $self->cloudservers->token,
'Content-Type' => 'application/json',
],
to_json({ server => { adminPass => $password, } }));
my $response = $self->cloudserver
th-Token' => $self->cloudservers->token,
'Content-Type' => 'application/json',
],
to_json({ server => { name => $name, } }));
my $response = $self->cloudservers->_reque
=> hmac_sha1_hex($date_string, $self->secret),
'accept' => 'application/json',
);
}
around qw/get put post delete/ => sub {
my $orig = shift;
my $self = shift;
ict;
use warnings;
use parent qw(JSV::Keyword);
use JSON;
use JSV::Keyword qw(:constants);
use JSV::Util::Type qw(detect_instance_type escape_json_pointer);
sub instance_type() { INSTANCE_TYPE_ARRA
i]);
}
elsif ($additional_items_type eq "boolean" && $additional_items == JSON::false) {
$context->log_error("additionalItems are not allowed");
}
ge JSV::Reference;
use strict;
use warnings;
use Carp;
use Clone qw(clone);
use Data::Walk;
use JSON::Pointer;
use Scalar::Util qw(weaken);
use URI;
use URI::Split qw(uri_split uri_join);
my %memo;
e reference: uri = %s", $uri);
}
if ( $fragment ) {
eval {
$schema = JSON::Pointer->get($schema, $fragment, 1);
};
if (my $e = $@ ) {
die sprin
rver} . '/' . $call . '.json' => $header => json => $payload );
} elsif ( $mode eq 'delete' ) {
$tx = $ua->delete( $config->{server} . '/' . $call . '.json' => $header );
l . '.json' => $header => json => $payload );
} else {
my $combined_payload = { %$payload, %$params };
$tx = $ua->get( $config->{server} . '/' . $call . '.json' =>
bined_payload );
}
if ( my $res = $tx->success ) {
$response = $res->json;
} else {
warn 'fail';
p $tx->body;
my $err = $tx->er
package Color::Brewer;
use strict;
use warnings;
use utf8;
use JSON;
use File::ShareDir;
use Params::Validate qw(:all);
use Path::Tiny;
our $VERSION = 0.001;
=encoding utf-8
=head1 NAME
Color::B
r_brewer {
if ( !defined $colors ) {
$colors = from_json( path( File::ShareDir::dist_file( 'Color-Brewer', 'colorbrewer.json' ) )->slurp_utf8() );
}
return $colors;
}
=head2 named
Brewer website and color schemes are copyrighted by Cynthia Brewer. With this module is bundled a json file with the color schemes.
This product includes color specifications and designs developed b
rge;
my $json;
if ( $parameters{id} ) {
warn("The Sourceforge API no longer understands user IDs.");
return 0;
} elsif ( $parameters{username} ) {
$json = $api->cal
'You must provide an id or username. Bad monkey.');
return 0;
}
$self->{data} = $json;
return $self;
}
sub email { return shift->sf_email(); }
=head2 projects
Returns an array
= $api;
my $json;
if ( $parameters{id} ) {
warn('The API does not support project IDs any more');
return 0;
} elsif ( $parameters{name} ) {
$json = $api->call(
arn('You must provide an id or name. Bad monkey.');
return 0;
}
$self->{data} = $json;
return $self;
}
=head2 admins
@admins = $project->admins();
Returns a list of WWW::Sour
end_date -> '2012-07-25'
);
=cut
# https://sourceforge.net/projects/xbmc/files/stats/json?start_date=2010-05-01&end_date=2010-05-11
sub downloads {
my $self = shift;
my %args = @_
base 'App::GitHooks::Plugin';
# External dependencies.
use CPAN::Changes;
use Data::Dumper;
use JSON qw();
use LWP::UserAgent;
use Log::Any qw($log);
use Try::Tiny;
# Internal dependencies.
use App
lack, check under "Integration
settings" for the following information: "Webhook URL", "Send your JSON
payloads to this URL". This is the URL you need to set as the value for the
C<slack_post_url> con
%s', $channel, $message );
# Prepare payload for the request.
my $request_payload =
JSON::encode_json(
{
text => $message,
channel => $channel,
}
);
# Prepare requ
use WWW::SourceForge;
use WWW::SourceForge::Project;
use LWP::Simple qw();
use Data::Dumper;
use JSON::Parse;
use LWP::UserAgent;
use LWP::Authen::OAuth;
use HTTP::Request::Common;
our $VERSION = '0
the JSON and parse it. Die on bad JSON;
=cut
sub get {
my ( $self, %parameters ) = @_;
my $r = {};
my $json = LWP::Simple::get( $parameters{url} );
eval { $r = JSON::Parse::json_to_
perl( $json ); };
if ( $@ ) {
warn $@;
return {};
} else {
return $r;
}
}
=head1 post_page
$self->post_page(
page => 'NewPage',
text => 'Wiki page bo