E/plugins" );
use utf8;
use Crypt::Lite;
use Digest::SHA1 qw(sha1_hex);
use HTML::Entities;
use JSON;
use WWW::Mechanize;
use Labyrinth::Globals;
use Labyrinth::Variables;
#-----------------------
content=".Dumper($mech->content());
## Process data
#my $data = from_json($mech->content(), {utf8 => 1});
my $data = from_json($mech->content());
#print STDERR "data=".Dumper($data);
my ($found,$
ead1 EXPORT
=cut
use strict;
use warnings;
use HTTP::Request::Common;
use LWP::UserAgent;
use JSON;
use MIME::Base64 'encode_base64';
use Time::HiRes (qw(gettimeofday));
use DateTime;
use Sys::Hos
'extra' => $params->{'extra'} || {}
};
my $json = JSON->new->utf8(1)->pretty(1)->allow_nonref(1);
return $json->encode( $data );
}
1;
=head1 LICENSE AND COPYRIGHT
Copyrigh
le);
use Digest::SHA1 qw//;
use Cookie::Baker;
use Plack::Util;
use Scalar::Util qw/blessed/;
use JSON::WebToken qw/encode_jwt decode_jwt/;
use Plack::Util::Accessor qw/
alg
secret
/;
sub pre
ding utf-8
=head1 NAME
Plack::Middleware::Session::Simple::JWSCookie - Session::Simple with JWS(JSON Web Sigmature) Cookie
=head1 SYNOPSIS
use Plack::Middleware::Session::Simple::JWSCookie;
Plack::Middleware::Session::Simple.
Session cookie include session metadata with signature using JSON Web Signature.
The session cookie prevents manipulation of the session ID,
and can detect the inv
-
# Library Modules
use lib ( "$BASE/lib", "$BASE/plugins" );
use utf8;
use HTML::Entities;
use JSON;
use WWW::Mechanize;
use Time::Local;
use Labyrinth::Globals;
use Labyrinth::Variables;
#------
content=".Dumper($mech->content());
## Process data
#my $data = from_json($mech->content(), {utf8 => 1});
my $data = from_json($mech->content());
#print STDERR "data=".Dumper($data);
my %counts =
package Amon2::Auth::Site::Google;
use Mouse;
use JSON;
use LWP::UserAgent;
use URI;
our $VERSION = "0.04";
has client_id => (
is => 'ro',
isa => 'Str',
required => 1,
);
ha
ent;
return $callback->{on_error}->($res->decoded_content);
};
my $token = decode_json $res->content;
my $uri = URI->new($self->token_info_url);
$uri->query_form(+{ access_tok
token->{access_token} });
$res = $self->ua->get($uri->as_string);
my $token_info = decode_json $res->content;
$res->is_success or do {
warn $res->decoded_content;
return $c
package Amon2::Auth::Site::Hatena;
use Mouse;
use JSON;
use OAuth::Lite::Token;
use OAuth::Lite::Consumer;
use Woothee;
our $VERSION = '0.04';
has consumer_key => (
is => 'ro',
isa
(
is => 'ro',
isa => 'Str',
default => 'http://n.hatena.com/applications/my.json',
);
has redirect_url => (
is => 'ro',
isa => 'Str',
);
no Mouse;
__PACKAGE__->meta->m
fo_url);
return $error->($self->ua->errstr) if $res->is_error;
my $data = decode_json($res->decoded_content);
push @args, $data;
}
$callback->{on_finished}->(@args);
ntService.RPC' => 'https://api.ewaypayments.com/json-rpc',
'PaymentService.JSONPScript' =>
'https://api.ewaypayments.com/JSONP/v1/js',
};
}
else {
re
'https://api.sandbox.ewaypayments.com/json-rpc',
'PaymentService.JSONPScript' =>
'https://api.sandbox.ewaypayments.com/JSONP/v1/js',
};
}
}
has 'username'
ult => sub { 'REST' } );
has 'Request_Format' =>
( is => 'rw', required => 1, default => sub { 'JSON' } );
has 'ua' => ( is => 'lazy' );
sub _build_ua {
my $self = shift;
return WWW::Mecha
rAgent;
use JSON qw(decode_json encode_json);
use Time::HiRes qw/gettimeofday/;
use Data::Dumper;
} else {
use LWP::UserAgent;
use JSON qw(decode_json encode_json);
use Time:
>{'last_reason'} = '';
$self->{'device_url'} = "https://developer-api.nest.com/devices.json?auth=".$self->{'auth_token'};
$self->{'last_exec_time'} = 0;
if (!defined $self->{'debu
= $response->code;
if ($response->is_success) {
my $decoded_response = decode_json($response->content);
my $designation = ($decoded_response->{'thermostats'});
', 'ExpiryMonth', 'ExpiryYear',
'StartMonth', 'StartYear', 'IssueNumber', 'CVN'
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
MockObject for test)
meta_file => 'META.json' or
'META.yml' or
'META.yaml', # META file (YAML or JSON which contains module requirement information)
_file) = @_;
return $opt_meta_file if ( defined $opt_meta_file );
for my $file ( qw(META.json META.yml META.yaml) ) {
return $file if ( -e $file );
}
croak "META file not foun
qw( &fix_encoding &fix_encoding_return );
@IGNORE_LIST = qw( Cpanel::JSON::XS::Boolean JSON::XS::Boolean JSON::PP::Boolean JSON::Boolean )
unless scalar @IGNORE_LIST;
}
########################
_LIST, 'JSON::Boolean';
By default the following references will be ignored (no warnings):
=over
=item Cpanel::JSON::XS::Boolean
=item JSON::XS::Boolean
=item JSON::PP::Boolean
=item JSON::Boole
ddress']
);
sub _build_ShippingAddress { Business::eWAY::RapidAPI::ShippingAddress->new }
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
', 'State', 'PostalCode',
'Country', 'Email', 'Phone', 'Fax'
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
'Email', 'Phone', 'Mobile',
'Comments', 'Fax', 'Url'
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
ddress']
);
sub _build_ShippingAddress { Business::eWAY::RapidAPI::ShippingAddress->new }
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
t', 'InvoiceNumber', 'InvoiceDescription',
'InvoiceReference', 'CurrencyCode'
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
ngs;
use parent qw( SMS::Send::Driver );
use DateTime;
use Digest::HMAC_MD5;
use HTTP::Tiny;
use JSON;
use String::Random;
our $URL = "https://api.coolsms.co.kr/sms/1.1";
our $AGENT = 'SMS-Sen
id response for GET request';
if ( $res && $res->{success} ) {
$ret{detail} = decode_json( $res->{content} );
$ret{reason} = 'OK';
$ret{success} = 1;
}
else {
id response for POST request';
if ( $res && $res->{success} ) {
$ret{detail} = decode_json( $res->{content} );
$ret{reason} = $ret{detail}{result_message};
$ret{success} =
ayRef [ InstanceOf ['Business::eWAY::RapidAPI::LineItem'] ],
default => sub { [] }
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
package # hidden from PAUSE
Business::eWAY::RapidAPI::L
isa => Str )
foreach ( 'SKU', 'Description', 'Quantity', 'UnitCost', 'Tax', 'Total' );
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
Moo::Role;
use JSON::MaybeXS;
use XML::Simple;
sub Obj2ARRAY {
my ( $self, $obj ) = @_;
my $json = JSON::MaybeXS->new( convert_blessed => 1 );
return $json->decode( $json->encode($obj)
f, $obj ) = @_;
my $json = JSON::MaybeXS->new( convert_blessed => 1 );
return $json->encode($obj);
}
sub JSON2Obj {
my ( $self, $obj ) = @_;
my $json = JSON::MaybeXS->new( convert_b
lessed => 1 );
return $json->decode($obj);
}
sub Obj2XML {
my ( $self, $obj, $reqname ) = @_;
my $xs = XML::Simple->new(
GroupTags => { 'Items' => 'LineItem', 'Options' => 'O
rrayRef [ InstanceOf ['Business::eWAY::RapidAPI::Option'] ],
default => sub { [] }
);
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
package # hidden from PAUSE
Business::eWAY::RapidAPI::O
Moo;
use MooX::Types::MooseLike::Base 'Str';
has 'Value' => ( is => 'rw', isa => Str );
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e