or transmitting data
# to the browser. But JavaScript fails when it comes to binary formats
# so JSON is used
#
use strict;
use warnings;
use Encode ();
sub content_type { return "application/vnd.p
# the app is using a serializer and we were sent a blob of JSON, they could
# have come from that JSON, and thus could be hashrefs (JSON SQL injection)
# - for database providers, feeding a c
,
version => $VERSION,
base => 'XAS::Lib::RPC::JSON::Server',
utils => 'stat2text :validation',
constants => ':process :jsonrpc HASHREF',
vars => {
PARAMS => {
-processe
processes.
=head1 METHODS
=head2 new
This module inherits from L<XAS::Lib::RPC::JSON::Server|XAS::Lib::RPC::JSON::Server>
and takes all of the same parameters.
=head2 session_initialize
This met
package DBD::Crate;
use strict;
use DBI;
use HTTP::Tiny;
use JSON::MaybeXS;
use vars qw($VERSION $REVISION);
use vars qw($err $errstr $state $drh);
$VERSION = "0.0.3";
$err = 0;
$errstr
= "";
$state = "";
$drh = undef;
my $methods_are_installed = 0;
my ($HTTP, $JSON);
sub driver {
return $drh if $drh;
my ($class, $attr) = @_;
$class .= "::dr";
$drh
'AutoCommit' => 1
}) or return undef;
return $drh;
}
sub http { $HTTP }
sub json { $JSON }
#====================================================================
# DBD::Crate::dr
r
histogram
hrz
html
htm
icb
icon
ico
iiq
info
inline
ipl
isobrl
isobrl6
jng
jnx
jpeg
jpe
jpg
jps
json
k
k25
kdc
label
m
m2v
m4v
mac
magick
map
mask
matte
mat
mef
miff
mkv
mng
mono
mov
mp4
mpc
mpeg
mp
est) = @_;
# from draft-v8, format is specified to JSON only.
my $format = "json";
# my $format = $request->param("format") || "json";
my $formatter = OAuth::Lite2::Formatters->get_fo
rmatter_by_name($format)
|| OAuth::Lite2::Formatters->get_formatter_by_name("json");
my $res = try {
my $type = $request->param("grant_type")
or OAuth::Lite2::Server:
stall Bundle::Interchange'>
=head1 CONTENTS
Digest::MD5
Digest::SHA
MIME::Base64
MIME::Lite
JSON
URI::URL
HTML::Tagset
HTML::Entities
LWP
LWP::Protocol::https
Parse::RecDescent
OLE::Stora
nt(
join "/", __PACKAGE__, $OAuth::Lite2::VERSION);
}
# $self->{format} ||= 'json';
$self->{response_parser} = OAuth::Lite2::Client::TokenResponseParser->new;
return $sel
head1 SEE ALSO
L<OAuth::Lite2::Formatter>
L<OAuth::Lite2::Formatters>
L<OAuth::Lite2::Formatter::JSON>
L<OAuth::Lite2::Formatter::FormURLEncoded>
=head1 AUTHOR
Lyo Kato, E<lt>lyo.kato@gmail.comE<gt
b __legal_types { qw(requires recommends suggests conflicts) }
# expect a prereq spec from META.json -- rjbs, 2010-04-11
sub new {
my ($class, $prereq_spec) = @_;
$prereq_spec ||= {};
my %is_
idator;
our $VERSION = '2.150010';
#pod =head1 SYNOPSIS
#pod
#pod my $struct = decode_json_file('META.json');
#pod
#pod my $cmv = CPAN::Meta::Validator->new( $struct );
#pod
#pod unless ( $cmv
data structures
=head1 VERSION
version 2.150010
=head1 SYNOPSIS
my $struct = decode_json_file('META.json');
my $cmv = CPAN::Meta::Validator->new( $struct );
unless ( $cmv->is_valid ) {
package OAuth::Lite2::Formatters;
use strict;
use warnings;
use OAuth::Lite2::Formatter::JSON;
use OAuth::Lite2::Formatter::XML;
use OAuth::Lite2::Formatter::FormURLEncoded;
use OAuth::Lite2::Format
S_BY_TYPE{$formatter->type} = $formatter;
}
__PACKAGE__->add_formatter( OAuth::Lite2::Formatter::JSON->new );
__PACKAGE__->add_formatter( OAuth::Lite2::Formatter::XML->new );
__PACKAGE__->add_formatt
ter = OAuth::Lite2::Formatter->get_formatter_by_name("json");
my $formatter = OAuth::Lite2::Formatter->get_formatter_by_type("application/json");
my $obj = $formatter->parse( $string );
$
verter;
our $VERSION = '2.150010';
#pod =head1 SYNOPSIS
#pod
#pod my $struct = decode_json_file('META.json');
#pod
#pod my $cmc = CPAN::Meta::Converter->new( $struct );
#pod
#pod my $new_struc
eturn \$new;
}
# We can't know if TO_JSON gives us cloned data, so refs must recurse
if ( eval { $ref->can('TO_JSON') } ) {
my $data = $ref->TO_JSON;
return ref $data ? _dclone( $data )
data structures
=head1 VERSION
version 2.150010
=head1 SYNOPSIS
my $struct = decode_json_file('META.json');
my $cmc = CPAN::Meta::Converter->new( $struct );
my $new_struct = $cmc->convert(
.008001;
use strict;
use warnings;
package Parse::CPAN::Meta;
# ABSTRACT: Parse META.yml and META.json CPAN metadata files
our $VERSION = '2.150010';
use Exporter;
use Carp 'croak';
our @ISA = qw/E
($meta);
}
elsif ($filename =~ /\.json$/) {
return $class->load_json_string($meta);
}
else {
$class->load_string($meta); # try to detect yaml/json
}
}
sub load_string {
my ($class
lass->load_yaml_string($string);
}
elsif ( $string =~ /^\s*\{/ ) { # looks like JSON
return $class->load_json_string($string);
}
else { # maybe doc-marker-free YAML
return $class->load
er
=item *
Revised spec examples as perl data structures rather than YAML
=item *
Switched to JSON serialization from YAML
=item *
Specified allowed version number formats
=item *
Replaced 're
=> '5.006',
'File::Spec' => '0.86',
'JSON' => '2.16',
},
recommends => {
'JSON::XS' => '2.26',
},
suggests => {
'Archi
ctory to a file that contains or
generates the package. It may be given as C<META.yml> or C<META.json>
to claim a package for indexing without needing a C<*.pm>.
=item version
If it exists, this fi
N
Distribution metadata should be serialized (as a hashref) as
JSON-encoded data and packaged with distributions as the file
F<META.json>.
In the past, the distribution metadata structure had been p
use CPAN::Meta;
#pod use Module::Load;
#pod
#pod my $meta = CPAN::Meta->load_file('META.json');
#pod
#pod printf "testing requirements for %s version %s\n",
#pod $meta->name,
#pod
od
#pod =head1 DESCRIPTION
#pod
#pod Software distributions released to the CPAN include a F<META.json> or, for
#pod older distributions, F<META.yml>, which describes the distribution, its
#pod conten
ements for building and installing the distribution.
#pod The data structure stored in the F<META.json> file is described in
#pod L<CPAN::Meta::Spec>.
#pod
#pod CPAN::Meta provides a simple class to r
se( $formatted_string );
=head1 SEE ALSO
L<OAuth::Lite2::Formatters>
L<OAuth::Lite2::Formatter::JSON>
L<OAuth::Lite2::Formatter::XML>
L<OAuth::Lite2::Formatter::FormURLEncoded>
=head1 AUTHOR
Lyo K
head1 SEE ALSO
L<OAuth::Lite2::Formatter>
L<OAuth::Lite2::Formatters>
L<OAuth::Lite2::Formatter::JSON>
L<OAuth::Lite2::Formatter::XML>
=head1 AUTHOR
Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
=head1 C
Auth::Lite2::Formatters>
L<OAuth::Lite2::Formatter::FormURLEncoded.pm>
L<OAuth::Lite2::Formatter::JSON>
L<OAuth::Lite2::Formatter::XML>
=head1 AUTHOR
Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
=head1 C