D::View::JSON;
{
$Catalyst::Plugin::AutoCRUD::View::JSON::VERSION = '2.143070';
}
use strict;
use warnings;
use base 'Catalyst::View::JSON';
__PACKAGE__->config(
expose_stash => 'json_data',
kage Plack::Middleware::JSON;
use strict;
use warnings;
use parent qw/Plack::Middleware/;
use JSON::XS;
use URI::Escape;
our $VERSION = 0.01;
use Plack::Util::Accessor qw/json_key callback_key/;
sub
if (defined $self->json_key) {
my $json_key = $self->json_key() . '|' . $self->callback_key;
$self->json_key($json_key);
}
else {
$self->json_key($self->callback_
1]);
my $json_key = $self->json_key;
my $content_type = $h->get('Content-Type') || '';
if (($json_key and $env->{QUERY_STRING} =~ /(?:^|&)($json_key)=([^&]+)/) or $
use strict;
use warnings;
package JSON::String::HASH;
our $VERSION = '0.2.0'; # VERSION
use JSON::String::BaseHandler
'_reencode',
'_recurse_wrap_value',
'constructor' => { type => 'HAS
) }
1;
=pod
=head1 NAME
JSON::String::HASH - Handle hashes for JSON::String
=head1 DESCRIPTION
This module is not intended to be used directly. It is used by
L<JSON::String> to tie behavior to
nd the serialized representation
saved back to the original location.
=head1 SEE ALSO
L<JSON::String>, L<JSON>
=head1 AUTHOR
Anthony Brummett <brummett@cpan.org>
=head1 COPYRIGHT
Copyright 2015,
arnings;
package JSON::String;
use Carp qw(croak);
our @CARP_NOT = qw(JSON::String::BaseHandler JSON::String::HASH JSON::String::ARRAY);
use JSON;
use JSON::String::ARRAY;
use JSON::String::HASH;
construct_object($elt, undef, $encoder);
}
$self = [];
CORE::tie @$self, 'JSON::String::ARRAY', data => $data, encoder => $encoder;
} elsif (ref($data) eq 'HASH') {
$self = {};
CORE::tie %$self, 'JSON::String::HASH', data => $data, encoder => $encoder;
}
return $self;
}
{
my $codec = JSON->new->canonical;
sub codec {
shif
use strict;
use warnings;
package JSON::String::ARRAY;
our $VERSION = '0.2.0'; # VERSION
use JSON::String::BaseHandler
'_reencode',
'_recurse_wrap_value',
'constructor' => { type => 'AR
1;
=pod
=head1 NAME
JSON::String::ARRAY - Handle arrays for JSON::String
=head1 DESCRIPTION
This module is not intended to be used directly. It is used by
L<JSON::String> to tie behavior to
nd the serialized representation
saved back to the original location.
=head1 SEE ALSO
L<JSON::String>, L<JSON>
=head1 AUTHOR
Anthony Brummett <brummett@cpan.org>
=head1 COPYRIGHT
Copyright 2015,
use strict;
use warnings;
package JSON::String::BaseHandler;
use Carp qw(croak);
our @CARP_NOT = qw(JSON::String::ARRAY JSON::String::HASH);
our $VERSION = '0.2.0'; # VERSION
use Sub::Exporter -se
',
'_recurse_wrap_value',
'constructor' => \&build_constructor,
]
};
require JSON::String;
sub build_constructor {
my($class, $name, $args) = @_;
my $type = $args->{type
val) = @_;
return JSON::String::_construct_object($val, undef, encoder($self));
}
1;
=pod
=head1 NAME
JSON::String::BaseHandler - Common code for hashes and arrays in JSON::String
=head1 DESC
warnings FATAL => 'all';
package MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::JSON;
use parent qw/MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Base/;
use MarpaX::
erClasses;
our $grammar_content = do {local $/; <DATA>};
# ABSTRACT: ECMAScript-262, Edition 5, JSON grammar
our $VERSION = '0.020'; # VERSION
sub make_grammar_content {
my ($class) = @_;
F-8
=head1 NAME
MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::JSON - ECMAScript-262, Edition 5, JSON grammar
=head1 VERSION
version 0.020
=head1 SYNOPSIS
use strict;
use
JSON::Version;
use warnings;
use strict;
use vars qw($VERSION);
$VERSION = '0.16';
#----------------------------------------------------------------------------
=head1 NAME
Test::CPAN::Meta::JSON
specification
=head1 SYNOPSIS
use Test::CPAN::Meta::JSON::Version;
=head1 DESCRIPTION
This module was written to ensure that a META.json file, provided with a
standard distribution uploaded to
a::JSON>, however
the code is self contained enough that you can access it directly.
See L<CPAN::Meta> for further details of the CPAN Meta Specification.
=head1 ABSTRACT
Validation of META.json da
eta::JSON;
use warnings;
use strict;
use vars qw($VERSION);
$VERSION = '0.16';
#----------------------------------------------------------------------------
=head1 NAME
Test::CPAN::Meta::JSON - V
alidate a META.json file within a CPAN distribution.
=head1 SYNOPSIS
There are two forms this module can be used.
The first is a standalone test of your distribution's META.json file:
use Test::
More;
eval "use Test::CPAN::Meta::JSON";
plan skip_all => "Test::CPAN::Meta::JSON required for testing META.json" if $@;
meta_json_ok();
Note that you may provide an optional label/comment/mess
andlerX::Field::JSON;
# ABSTRACT: a script tag which sets a var using JSON C<data>, encoded from perl data supplied via field for L<HTML::FormHandler>.
$HTML::FormHandlerX::Field::JSON::VERSION = '0.0
04';
use Moose;
extends 'HTML::FormHandler::Field::NoValue';
use namespace::autoclean;
use JSON::MaybeXS;
use JavaScript::Minifier::XS qw();
has 'data_key' => ( is => 'rw', isa => 'Str', builder =>
($self);
return $result;
}
sub wrap_data {
my $self = shift;
my $json = $self->deflator( @_ > 1 ? [@_] : $_[0] );
chomp $json;
my $data_key = $self->data_key;
my $javascript = '';
if ( $dat
package Puncheur::Plugin::JSON;
use 5.010;
use strict;
use warnings;
use JSON;
our @EXPORT = qw/res_json/;
sub res_json {
my ($self, $data) = @_;
state $json = JSON->new->ascii(1);
stat
# ditto.
};
my $body = $json->encode($data);
$body =~ s!([+<>])!$escape->{$1}!g;
my $user_agent = $self->req->user_agent || '';
# defense from JSON hijacking
if (
(!$s
&&
($self->req->method||'GET') eq 'GET')
{
my $content = "Your request may be JSON hijacking.\nIf you are not an attacker, please add 'X-Requested-With' header to each request.";
kage Config::JSON;
$Config::JSON::VERSION = '1.5202';
use strict;
use Moo;
use Carp;
use File::Spec;
use JSON 2.0;
use List::Util;
use constant FILE_HEADER => "# config-file-type: JSON 1\n";
#---
ndef;
my $json = <$FILE>;
close($FILE);
my $conf = eval { JSON->new->relaxed->utf8->decode($json); };
confess "Couldn't parse JSON in config file '$path
f->pathToFile;
# convert data to json
my $json = JSON->new->pretty->utf8->canonical->encode($self->config);
my $to_write = FILE_HEADER . "\n" . $json;
my $needed_bytes = length $to_w
ation::JSON;
use 5.006;
use strict;
use warnings;
use JSON;
=head1 NAME
WWW::Session::Serialization::JSON - Serialization engine for WWW::Session with JSON backend
=head1 DESCRIPTION
JSON serial
hods : serialize() and expand()
use WWW::Session::Serialization::JSON;
my $serializer = WWW::Session::Serialization::JSON->new();
...
$string = $serializer->serialize($structure
THODS
=head2 new
Creates a new WWW::Session::Serialization::JSON object
Usage :
my $serializer = WWW::Session::Serialization::JSON->new();
No arguments required.
=cut
sub new {
my $
Redis::JSON;
our $VERSION = '0.001'; # VERSION
# ABSTRACT: Session store in Redis with JSON serialization
use base 'Dancer::Session::Abstract';
use Redis;
use JSON qw(encode_json decode_json);
use
Function::Parameters qw(:strict);
use Dancer::Config qw(setting);
use Dancer::Session::Redis::JSON::Signature qw(sign unsign);
my $REDIS;
my $secret;
sub init {
my ($class) = @_;
$class->S
('session_cookie_path') // '/',
httpOnly => setting('session_is_http_only') // JSON::true,
expires => setting('session_expires'),
originalMaxAge => un
use strict;
use warnings;
package Dancer::Session::Redis::JSON::Signature;
# Adapted from https://github.com/visionmedia/node-cookie-signature
use Digest::SHA qw(hmac_sha256_base64 sha1_hex);
use Fu
sha1_hex($mac) eq sha1_hex("s:$val");
}
1;
__END__
=pod
=head1 NAME
Dancer::Session::Redis::JSON::Signature
=head1 VERSION
version 0.001
=head1 AUTHOR
Forest Belton <forest@homolo.gy>
=head
use strict;
use warnings;
package Devel::Cover::Report::Json_detailed;
our $VERSION = '0.001000';
# ABSTRACT: Generate a comprehensive JSON file articulating the full contents of a coverage run.
require Devel::Cover::DB::IO::JSON;
my $io = Devel::Cover::DB::IO::JSON->new( options => 'pretty' );
$io->write( $report, "$options->{outputdir}/cover_detailed.json" );
return;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Devel::Cover::Report::Json_detailed - Generate a comprehensive JSON file articulating the full contents of a coverage run.
=head1 VERSION
version 0.001000
=head1
package App::KV2JSON;
use 5.008001;
use strict;
use warnings;
our $VERSION = "0.02";
use Encode;
use JSON::PP;
sub run {
my ($class, @argv) = @_;
if ($argv[0] =~ /^--?h(?:elp)?$/) {
my @key_values = (_kv_from_pipe(), @argv);
my $hash = kv2hash(@key_values);
my $coder = JSON::PP->new->ascii(1);
$coder->encode($hash) . "\n";
}
sub kv2hash {
my @key_values = @_;
arget->{$key};
}
}
$hash;
}
sub print_usage {
print <<'...';
Usage:
% kv2json var=baz fruits[]=apple,orange aa[bb]=cc
{"fruits":["apple","orange"],"var":"baz","aa":{"bb":"
use warnings;
package Test::Apocalypse::CPANMeta_JSON;
$Test::Apocalypse::CPANMeta_JSON::VERSION = '1.006';
BEGIN {
$Test::Apocalypse::CPANMeta_JSON::AUTHORITY = 'cpan:APOCAL';
}
# ABSTRACT: Plugi
st::CPAN::Meta::JSON 0.10;
# We need to make sure there's actually a JSON file in the dist!
sub _is_disabled {
if ( ! -e 'META.json' ) {
return 'Distro did not come with a META.json file';
}
}
s
_test {
meta_json_ok();
return;
}
1;
__END__
=pod
=encoding UTF-8
=for :stopwords Apocalypse Niebur Ryan
=for Pod::Coverage do_test
=head1 NAME
Test::Apocalypse::CPANMeta_JSON - Plugin for
ge HeliosX::Job::JSON::TestService;
use 5.008;
use strict;
use warnings;
use base 'Helios::Service';
use Helios::Config;
use Helios::LogEntry::Levels qw(:all);
use HeliosX::Job::JSON;
our $VERSION
ME
HeliosX::Job::JSON::TestService - service for testing HeliosX::Job::JSON jobs
=head1 SYNOPSIS
# create a Helios job using HeliosX::Job::JSON
use HeliosX::Job::JSON;
my $json = qq/
{
iosX::Job::JSON::TestService",
"args" : {
"arg1" : "value1",
"arg2" : "value2"
}
}
/;
my $job = HeliosX::Job::JSON->new(argst
package HeliosX::Job::JSON::Error;
use 5.010;
use strict;
use warnings;
use base 'Helios::Error::BaseError';
our $VERSION = '1.00';
1;
__END__