use JSON;
use Hash::Flatten qw(:all);
use LWP::UserAgent;
my $ua = LWP::UserAgent->new();
$ua->agent("${modname}/${modver}");
$ua->timeout(1);
$ua->default_header('Accept' => "application/json");
return $self->_json_get( $lcapi{urls}{api}{accounts}{availablecash} )->{availableCash};
}
sub summary
{
my ($self) = @_;
return $o->unflatten( $self->_json_get( $lcapi{urls}{ap
urn $o->unflatten( $self->_json_get( $lcapi{urls}{api}{accounts}{notes} ) );
}
sub detailed_notes_owned
{
my ($self) = @_;
return $o->unflatten( $self->_json_get( $lcapi{urls}{api}{ac
end
my $json = $mailjet->send('apikey');
All "post" methos are called on send_post
my $data = ( 'name' =>'Name' , 'DateType'=> "str", 'NameSpace' : 'static' );
my $json = $mailjet-
are called on send_put
my $data = ( 'title' => 'Update title of the Newsletter' );
my $json = $mailjet->send_put('newsletter/123' , %data);
=cut
=head1 AUTHOR
Anwesh <kanishkablack@gmx.c
package WJSON;
use Moose;
use JSON;
use Encode;
use Tie::IxHash;
no warnings 'uninitialized';
our $VERSION = '0.08';
has 'json' => (
is => 'ro',
isa => 'ArrayRef',
default => sub {
alar(@{$self->json}) || 1;
if (scalar(@{$self->reference->{$tmp.'/'.$key}}) == 1) {
my $result = $self->reference->{$tmp.'/'.$key}[0];
if (ref($self->json->[$total - 1]
if ($type == 1) {
push(@{$self->json}, {$key => $result});
}elsif($type == 2) {
$self->json->[$total - 1]{$key} = [$result];
}e
cription provided in L<DR::Tarantool::Spaces>.
Supported data types are numbers, Unicode strings, JSON,
fixed-point decimals.
=head3 Insertion
$tnt->insert('users' => [ 123, 'vasya', 'admin' ]);
s above, but uses B<NUM64> as the underlying storage.
=item JSON
An arbitrary Perl object is automatically serialized to JSON with
L<JSON::XS> on insertion, and deserialized on selection.
=back
Th
necessary:
L<AnyEvent>, L<Coro>, L<Test::Pod>, L<Test::Spelling>,
L<Devel::GlobalDestruction>, L<JSON::XS>.
To run tests, do:
perl Makefile.PL
make
make test
The test suite attempts to
{
name => 'opts',
type => 'JSON',
}
],
indexes => {
0 =
INT & INT64
The same as B<NUM> and B<NUM64>, but contain signed values.
=item JSON
The field is encoded with L<JSON::XS> when putting
into a database, and decoded after is received back
from the
ple( $tuple );
}
package DR::Tarantool::Space;
use Carp;
$Carp::Internal{ (__PACKAGE__) }++;
use JSON::XS ();
use Digest::MD5 ();
=head1 SPACES methods
=head2 new
constructor
use DR::Taranto
es) on each table. The structure is intended to be
passed to is_deeply for comparison.
=cut
use JSON; # Used to convert perl data to a string.
use Moose;
use MooseX::StrictConstructor;
=head1 FI
isa => 'Ref',
lazy_build => 1,
);
has _json_engine => (
is => 'ro',
isa => 'JSON',
default => sub { return JSON->new->pretty(1) }
);
=head1 LICENSE AND COPYRIGHT
my $self = shift;
my $return_hash = {};
my $dbh = $self->dbh;
my $json = $self->_json_engine;
# TODO: Use "show create table $table" here instead
# as people
tore as a json string so that differences are easy to
# understand when they occur.
my @colums = ();
foreach my $name (@colum_names) {
push @colums, $json->encode(
ERSION = '0.0008'; # VERSION
use HTTP::Request::Common qw(DELETE GET POST PUT);
use JSON qw(decode_json encode_json);
use LWP::UserAgent;
has base_url => ( is => 'ro', required => 1 );
has ua => (
self->req(POST $path, content => encode_json $params);
}
sub put {
my ($self, $path, $params) = @_;
return $self->req(PUT $path, content => encode_json $params);
}
sub delete {
my ($self
ATED in favor of'
. ' WebService::Client.';
$req->header(content_type => 'application/json');
$self->_log_request($req);
my $res = $self->ua->request($req);
Moo::Role->apply_ro
OKKO';
}
$Finance::Bank::Paytrail::VERSION = '0.010';
use Moose;
use utf8;
use Data::Dumper;
use JSON::XS;
use Net::SSLeay qw/post_https make_headers/;
use Digest::MD5 qw/md5_hex/;
use MIME::Base64;
> '6pKF4jkv97zmqBJ3ZL8gUw5DfT2NMQ' );
=encoding utf-8
=cut
# ABSTRACT: Process payments through JSON API of Paytrail (Suomen Verkkomaksut) in Finland. Payments from all Finnish Banks online: Nordea,
ng through Collector and Klarna.
=head1 NAME
Finance::Bank::Paytrail - Process payments through JSON API of Paytrail (Suomen Verkkomaksut) in Finland. Payments from all Finnish Banks online: Nordea,
use Mojo::JSON;
use DateTime;
sub new {
my $that = shift;
my $proto = ref($that) || $that;
my $self = $proto->SUPER::new(@_);
bless( $self, $proto );
$self->{json} = Mojo::JSON->new;
$data ) = @_;
my ( $package, $filename, $line ) = caller;
my $dt = DateTime->now;
$data->{package} = $package;
$self->info( $self->json->encode($data) );
}
sub json { (shift)->{json} }
1;
package WebService::Openaura;
use JSON::XS;
use Cache::LRU;
use Net::DNS::Lite;
use Furl;
use URI;
use URI::QueryParam;
use Carp;
use Moo;
use namespace::clean;
our $VERSION = "0.02";
$Net::DNS::Lit
sts(?:_all)*|) {
$content =~ s/^(\[.+\])$/{ "artists": $1 }/;
}
my $data = decode_json( $content );
if ( defined $data->{results}{error} ) {
my $type = $data->{results
package WebService::Decibel;
use JSON::XS;
use Cache::LRU;
use Net::DNS::Lite;
use Furl;
use URI;
use URI::QueryParam;
use Carp;
use Moo;
use namespace::clean;
our $VERSION = "0.03";
$Net::DNS::Lite
);
if ( $content !~ /^\{/) {
confess $content;
} else {
return decode_json( $content );
}
}
1;
__END__
=encoding utf-8
=head1 NAME
WebService::Decibel - A simple a
ator;
$CPAN::Cover::Results::ReleaseIterator::VERSION = '0.03';
use Moo;
use autodie;
use JSON qw/ decode_json /;
use Carp;
use CPAN::Cover::Results::Release;
has 'results' => ( is => 'ro' )
;
my $fh = $self->results->open_file();
local $/;
my $json_text = <$fh>;
close($fh);
return decode_json($json_text);
}
sub _build__keys
{
my $self = shift;
m
0.03 }
;
has '+url' =>
(
default => sub { 'http://cpancover.com/latest/cpancover.json.gz' },
);
sub release_iterator
{
my $self = shift;
return CPAN::Cover::Results::Rel
:Cli::Monitor;
use strict;
use warnings;
use v5.10;
our $VERSION = '0.01';
use Zabbix::API;
use JSON;
use Term::ANSIColor;
use MooseX::App::Simple qw(Color ConfigHome);
use Data::Dumper;
$Data::Du
;
say <<EOF;
~/.zabmon/config.yaml
---
user: api_user
api_url: http://your.zabbix.url/api_jsonrpc.php
password: imal33thaxx0r
EOF
exit 1;
}
my $zabbix = Zabbix::API->new(
}
}
);
# Returns the data as a JSON string in _content,
# get it into a useful data structure:
my $content = from_json($resp->{_content});
return $content->{result};
Serializer::JSONPP;
use strict;
use warnings;
use 5.008_005;
our $VERSION = '0.02';
use Dancer::Config 'setting';
use Dancer::SharedData;
use base 'Dancer::Serializer::Abstract';
use JSON::PP;
sub
sub _build_jsonpp {
my $self = shift;
my $json = JSON::PP->new;
my $options = {};
my $config = setting('engines') || {};
$config = $config->{JSONPP} || $config->{JSON} || {};
# straight pass through of config options to JSON
map { $options->{$_} = $config->{$_} } keys %$config;
# pull in config from serializer init as well (and possibly override settings from t
return {
json => {
type => 'application/json',
exporter => [ 'JSON', pretty => 1 ],
docs => 'http://json.org/',
},
sgi> and query via unAPI:
curl 'localhost:5000'
curl 'localhost:5000?id=1204.0492&format=json'
=head1 CONFIGURATION
=over
=item query
Code reference with a query method to get an item (as
default only
JSON and YAML are configured as following:
json => {
type => 'application/json',
exporter => [ 'JSON', pretty => 1 ],
docs => 'http://json.org/'
}
at});
croak "Unknown data format specified\n" unless($hash{format} =~ /^(yaml|json)$/i);
croak "Must specify a file or data block to parse\n" unless($hash{data} || $hash{fil
:Parser;
my $obj = CPAN::Testers::WWW::Reports::Parser->new(
format => 'YAML', # or 'JSON'
file => $file # or data => $data
);
# iterator, filtering field names
$obj-
hashref
my $obj = CPAN::Testers::WWW::Reports::Parser->new(
format => 'YAML', # or 'JSON'
file => $file # or data => $data
objects => 1, # Optional, works w
bService::Sift::VERSION);
$self->default_method('POST');
$self->content_type('application/json');
$self->base_url('https://api.siftscience.com/v203');
$self->auth_type('hash_key');
:Parser;
my $obj = CPAN::Testers::WWW::Reports::Parser->new(
format => 'YAML', # or 'JSON'
file => $file # or data => $data
objects => 1, # Optional, works wit
ion();
}
=head1 DESCRIPTION
This distribution is used to extract the data from either a JSON or a YAML file
containing metadata regarding reports submitted by CPAN Testers, and available
fr