lugin adds an C<x_maintainers> key in the distribution's metadata. This
will end up in the F<META.json> and F<META.yml> files, and may also be useful
for things like L<Pod::Weaver> plugins.
=head1 SU
ON);
require Exporter;
use Exporter;
@ISA = ('Exporter');
$VERSION = "1.02";
require 5.010;
use JSON ();
use LWP ();
use Anticaptcha ();
use Carp ();
sub new
{
# Check for common user mistake
C
my $json = JSON::encode_json($req);
my $res = $self->request({
task => 'createTask',
data => $json
});
if($self->{responce} eq 'json'){
return $res;
}else{
return JSON::decode_json($res
$self) = @_;
my $json = JSON::encode_json({clientKey => $self->{clientKey}});
my $res = $self->request({
task => 'getBalance',
data => $json
});
if($self->{responce} eq 'json'){
return $res
{ our $VERSION = '0.002'; }
use Moo;
use Ouch;
use Log::Any ();
use Data::Dumper;
use JSON::PP qw< decode_json >;
has endpoints => (
is => 'ro',
default => sub {
return {
0, "response status $response->{status}, nothing from $url)";
}
my $decoded = eval { decode_json($encoded) }
or ouch 500, "response status $response->{status}, exception: $@";
return $de
23abc112abc123abc123',
responce => 'json'
);
# Get account balance in JSON format
my $balance_json = $Anticaptcha->getBalance();
print $balance_json,"\n";
See L<Anticaptcha::Request> for
checkbox, radio button, and list box is automatically selected.
Note that this methods require L<JSON> module.
=head2 validate
$result = $vc->validate($data, $rule);
$result = $vc->validate($da
rse_random_string_rule($rule);
require JSON;
my $r_json = JSON->new->encode($r);
my $javascript = << "EOS";
(function () {
var rule = $r_json;
var create_random_value = function (rul
meta = $self->determine_metadata;
# prefer json file (spec v2)
if ( $metafile = first { m#^META\.json$# } @files ) {
$meta = CPAN::Meta->load_json_string( $dist->file_content($metafile) );
eanJSON;
our $DATE = '2017-01-03'; # DATE
our $VERSION = '0.002'; # VERSION
use 5.010001;
use strict;
use warnings;
use Exporter qw(import);
our @EXPORT_OK = qw(
clean_json_i
n_place
clone_and_clean_json
);
sub _clone {
if (eval { require Data::Clone; 1 }) {
Data::Clone::clone(@_);
} else {
require Clone::PP;
e::PP::clone(@_);
}
}
# generated with Data::Clean version 0.44, Data::Clean::JSON version 0.37
sub clean_json_in_place {
require Scalar::Util;
state $sub_unbless = sub { my $ref = shift
b action {
my $self = shift();
my $mongo = $self->mongodb();
...
return $self->render( json => undef );
}
Just in case you need access to the MongoDB client instance you can use this help
atmandu::Sane;
use LWP::UserAgent;
use JSON;
has query => (is => 'ro', required => 1);
has url => (is => 'ro', default => 'http://vocab.getty.edu/sparql.json');
has lang => (is => 'ro', default =
onse = $self->ua->post($self->url, $form);
if ($response->is_success) {
return decode_json($response->decoded_content);
} else {
Catmandu::HTTPError->throw({
code
package Ticketmaster::API;
use 5.006;
use strict;
use warnings;
use Carp;
use JSON::XS;
use LWP::UserAgent;
=head1 NAME
Ticketmaster::API - start interacting with Ticketmaster's APIs
=head1 VERSI
d => $uri);
my $res = $ua->request($req);
if ($res->is_success) {
return decode_json($res->content);
}
else {
Carp::croak("Error: " . $res->status_line);
}
}
=he
et
# @see OxdClient
# @see OxdConfig
#######################################
use JSON::PP;
package UpdateRegistration;
use vars qw($VERSION);
$VERSION = '0.01';
g/licenses/MIT MIT License
# @link https://gluu.org/
# @since Version 2.4.4
# @filesource
#/
use JSON::PP;
package OxdRegister; # This is the "Class"
use vars qw($VERSION);
$VERSIO
my $args = {@_};
return $self->get_data(method => 'GET', path_template => "$base_uri/events.json", parameters => $args);
}
=head2 event_details
Returns the event details by event ID.
Also See
provided\n");
return $self->get_data(method => 'GET', path_template => "$base_uri/events/$id.json", parameters => $args);
}
=head2 event_images
Returns all event images by event ID.
Also See:
d\n");
return $self->get_data(method => 'GET', path_template => "$base_uri/events/$id/images.json", parameters => $args);
}
=head2 search_attractions
Returns available attactions
Also See: htt
JSON ();
use overload '""' => sub { $_[0]->to_string }, fallback => 1;
our %TYPES = (
'disconnect' => 0,
'connect' => 1,
'heartbeat' => 2,
'message' => 3,
'json
shift;
my $self = {@_};
bless $self, $class;
$self->{type} ||= ref $self->{data} ? 'json_message' : 'message';
if ($self->{type} eq 'connect' || $self->{type} eq 'heartbeat') {
}
sub is_message {
my $self = shift;
return $self->type eq 'message' || $self->type eq 'json_message';
}
sub parse {
my $self = shift;
my ($string) = @_;
return unless defined
has 'format' => (
is => 'rw',
default => sub { 'json' },
);
=head1 METHODS
=head2 new({ api_key => $key [, format => '(xml|json)'] })
Create a new L<Guardian::OpenPlatform::API> objec
default format for the data that you get
back from the Guardian. Valid values are 'json' or 'xml'. Default is 'json'.
=back
=head2 content({ qry => $query, [ filter => $filter, format => $fmt ] });
mat
This item is optional. Defines the data format that you want to get back.This can
be either 'json' or 'xml'. If no value is given then the default format given to
the C<new> method is used.
=ba
kage;
our $VERSION = \'0.2\';
'
},
'metafile' => {
'Dist-Metadata-Test-MetaFile-2.2/META.json' => '{
"abstract" : "Fake dist for testing metadata determination",
"author" : [
"Ran
his "dist" is for testing Dist::Metadata.
',
'Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.json' => '{
"abstract" : "Fake dist for testing metadata determination",
"author" : [
"Ran
ot receive a token or URL", "access_api() test without params" );
my $json = $oauth->access_api( $token, $api_url );
like( $json, qr/yahoo/, "access_api() test with token & URL" );
$oauth->save_toke
Plugins to use.
#pod 'GatherDir',
#pod 'Manifest',
#pod 'MetaJSON',
#pod ],
#pod files => { # Files to add.
#pod
# Expected content of MANIFEST.
#pod 'MANIFEST',
#pod 'META.json',
#pod 'dist.ini',
#pod 'lib/Dummy.pm',
#pod ],
#pod
# Plugins to use.
'GatherDir',
'Manifest',
'MetaJSON',
],
files => { # Files to add.
'lib/Dummy.p
package Jmespath::Functions;
use strict;
use warnings;
use parent 'Exporter';
use JSON;
use Try::Tiny;
use POSIX qw(ceil floor);
use Jmespath::Expression;
use Jmespath::ValueException;
use Jmespath::J
ueException
->new({ message => 'contains() illegal boolean value' })
->throw
if JSON::is_bool($arg);
Jmespath::ValueException
->new({ message => 'Not a number: [' . $arg .
if JSON::is_bool($subject);
if ( ref $subject eq 'ARRAY' ) {
foreach (@$subject) {
return JSON::true if ( $_ eq $search ); #must be exact string match
}
return JSON::false;