Group
Extension

Matches 35358

Config-Any ( B/BR/BRICAS/Config-Any-0.23.tar.gz, BRICAS, 2011; MetaCPAN )
Config-Any/lib/Config/Any/JSON.pm ( view source; MetaCPAN )
package Config::Any::JSON;

use strict;
use warnings;

use base 'Config::Any::Base';

=head1 NAME

Config::Any::JSON - Load JSON config files

=head1 DESCRIPTION

Loads JSON files. Example:

    {
   
turn an array of valid extensions (C<json>, C<jsn>).

=cut

sub extensions {
    return qw( json jsn );
}

=head2 load( $file )

Attempts to load C<$file> as a JSON file.

=cut

sub load {
    my $cla
 };
    close $fh;

    eval { require JSON::DWIW; };
    unless( $@ ) {
        my $decoder = JSON::DWIW->new;
        my ( $data, $error ) = $decoder->from_json( $content );
        die $error if $e
Template-Plugin-JSON-Escape ( N/NA/NANTO/Template-Plugin-JSON-Escape-0.02.tar.gz, NANTO, 2011; MetaCPAN )
Template-Plugin-JSON-Escape/lib/Template/Plugin/JSON/Escape.pm ( view source; MetaCPAN )
Plugin::JSON::Escape;
use strict;
use warnings;

use base qw/Template::Plugin/;
use JSON ();

our $VERSION = 0.02;

sub new {
    my ($class, $context, $args) = @_;
    my $self = bless { json => unde
 $self->json_encode( @_ ) };
    $context->define_vmethod( $_ => json => $encode ) for qw/hash list scalar/;
    $context->define_filter( json => \&json_filter );

    return $self;
}

sub json {
    
   return $self->{json} if $self->{json};

    my $json = JSON->new->allow_nonref;
    my $args = $self->{args};
    for ( keys %$args ) {
        $json->$_( $args->{ $_ } ) if $json->can( $_ );
    }
HTML-Native ( M/MC/MCB/HTML-Native-1.0.1.tar.gz, MCB, 2011; MetaCPAN )
HTML-Native/lib/HTML/Native/JSON.pm ( view source; MetaCPAN )
package HTML::Native::JSON;

# Copyright (C) 2011 Michael Brown <mbrown@fensystems.co.uk>.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Gene
HTML::Native::JSON - embedded JSON data

=head1 SYNOPSIS

    use HTML::Native::JSON;

    my $json = HTML::Native::JSON->new ( {
      start => 4,
      end => 7
    } );
    print $json;
    # print
s "<script type="application/json">{"start":4,"end":7}</script>"

=head1 DESCRIPTION

An L<HTML::Native::JSON> object represents a piece of inline JSON
data, usable by JavaScript code such as the jQue
RINO-Client ( S/SA/SAXJAZMAN/cif/RINO-Client-0.03.tar.gz, SAXJAZMAN, 2011; MetaCPAN )
RINO-Client/lib/RINO/Client/Plugin/Json.pm ( view source; MetaCPAN )
package RINO::Client::Plugin::Json;

use strict;
require JSON;

sub write_out {
    my $class = shift;
    my $ref = shift;
    my @array = @{$ref};
    @array = splice(@array,1,$#array);

    ## fix 
 $a->{$k};
            next unless($x);
            my $h = eval { JSON::from_json($x) };
            next if($@);
            $a->{$k} = $h;
        }
    }

    return JSON::to_json(\@array);
}

1;
Project-Easy ( A/AP/APLA/Project-Easy-0.30.tar.gz, APLA, 2011; MetaCPAN )
Project-Easy/lib/Project/Easy/Config/Format/json.pm ( view source; MetaCPAN )
:Format::json;

use Class::Easy;

use JSON;

sub new {
	my $class = shift;
	
	my $json = JSON->new;
	$json->utf8 (1);
	$json->pretty (1);
	$json->convert_blessed (1);
	
	bless {worker => $json}, $clas
JSON-RPC-LWP ( B/BG/BGILLS/JSON-RPC-LWP-0.006.tar.gz, BGILLS, 2011; MetaCPAN )
JSON-RPC-LWP/lib/JSON/RPC/LWP.pm ( view source; MetaCPAN )
package JSON::RPC::LWP;
BEGIN {
  $JSON::RPC::LWP::VERSION = '0.006';
}
use 5.008;
use URI 1.58;
use LWP::UserAgent;
use JSON::RPC::Common;
use JSON::RPC::Common::Marshal::HTTP; # uses Moose

use Moos
d anyway
use JSON::RPC::Common::TypeConstraints qw(JSONValue);

subtype 'JSON.RPC.Version'
  => as 'Str'
  => where {
    $_ eq '1.0' ||
    $_ eq '1.1' ||
    $_ eq '2.0'
};

coerce 'JSON.RPC.Version
= blessed($self) || $self;

  no strict qw'vars refs';
  if( $class eq __PACKAGE__ ){
    return "JSON-RPC-LWP/$VERSION"
  }else{
    my $version = ${$class.'::VERSION'};
    if( $version ){
      ret
JSON-CPAN-Meta ( R/RJ/RJBS/JSON-CPAN-Meta-7.001.tar.gz, RJBS, 2011; MetaCPAN )
JSON-CPAN-Meta/lib/JSON/CPAN/Meta.pm ( view source; MetaCPAN )
use strict;
use warnings;
package JSON::CPAN::Meta;
our $VERSION = '7.001';

=head1 NAME

JSON::CPAN::Meta - (deprecated) replace META.yml with META.json

=head1 DESCRIPTION

B<Achtung!>  This library
 will soon be obsolete as tools move to use the
official L<CPAN::Meta::Spec> JSON files.

CPAN distributions contain a file, F<META.yml>, which contains a description of
the distribution and its conte
y simple
and easily understood data format.

JSON, unlike YAML, is lacking in features but is extremely easy to parse and
generate correctly.  Further, JSON documents are almost always valid YAML
docu
Memcached-Client ( M/MD/MDORMAN/Memcached-Client-2.01.tar.gz, MDORMAN, 2011; MetaCPAN )
Memcached-Client/lib/Memcached/Client/Serializer/JSON.pm ( view source; MetaCPAN )
kage Memcached::Client::Serializer::JSON;
BEGIN {
  $Memcached::Client::Serializer::JSON::VERSION = '2.01';
}
#ABSTRACT: Implements Memcached Serializing using JSON

use strict;
use warnings;
use Memc
ached::Client::Log qw{DEBUG LOG};
use JSON qw{decode_json encode_json};
use base qw{Memcached::Client::Serializer};

use constant F_JSON => 4;

sub deserialize {
    my ($self, $data, $flags) = @_;

 
ss defined $data;

    $flags ||= 0;

    if ($flags & F_JSON) {
        $self->log ("Deserializing data") if DEBUG;
        $data = decode_json $data;
    }

    return $data;
}

sub serialize {
    
DBIx-Class-FrozenColumns ( S/SY/SYBER/DBIx-Class-FrozenColumns-1.tar.gz, SYBER, 2011; MetaCPAN )
DBIx-Class-FrozenColumns/lib/DBIx/Class/FrozenColumns.pm ( view source; MetaCPAN )
ozen_columns> but uses Data::Dumper mechanism.

=head2 add_json_columns ($data_column, @columns)

Same as L</add_frozen_columns> but uses JSON::XS mechanism.

=cut

sub add_frozen_columns {
    my $th

        columns     => [@_],
    });
}

sub add_json_columns {
    shift->add_frozen_columns({
        type        => 'DBIx::Class::FrozenColumns::JSON',
        data_column => shift,
        columns
s || $this);
}


package DBIx::Class::FrozenColumns::JSON;
use base qw/DBIx::Class::FrozenColumns::Base/;

use strict;
use JSON::XS;
my $json = JSON::XS->new; #utf8 will be handled automatically (<dbt
Apache2-WebApp-Plugin-JSON ( M/MB/MBROOKS/Apache2-WebApp-Plugin-JSON-0.10.tar.gz, MBROOKS, 2011; MetaCPAN )
Apache2-WebApp-Plugin-JSON/lib/Apache2/WebApp/Plugin/JSON.pm ( view source; MetaCPAN )
----------------------------------+
#
#  Apache2::WebApp::Plugin::JSON - JSON module wrapper
#
#  DESCRIPTION
#  Interface to the JSON (JavaScript Object Notation) encoder/decoder.  
#
#  AUTHOR
#  Ma
--------------------------+

package Apache2::WebApp::Plugin::JSON;

use strict;
use warnings;
use base 'Apache2::WebApp::Plugin';
use JSON;

our $VERSION = 0.10;

#~~~~~~~~~~~~~~~~~~~~~~~~~~[  OBJECT
 Return to the caller a new JSON object.

sub _init {
    my ( $self, $params ) = @_;
    return new JSON;
}

1;

__END__

=head1 NAME

Apache2::WebApp::Plugin::JSON - JSON module wrapper

=head1 SYNO
Catalyst-TraitFor-Request-DecodedParams ( W/WR/WREIS/Catalyst-TraitFor-Request-DecodedParams-0.02.tar.gz, WREIS, 2011; MetaCPAN )
Catalyst-TraitFor-Request-DecodedParams/lib/Catalyst/TraitFor/Request/DecodedParams/JSON.pm ( view source; MetaCPAN )
::JSON;

use Moose::Role;
use namespace::autoclean;
use JSON::Any;
use Try::Tiny;

our $VERSION = '0.01';

with 'Catalyst::TraitFor::Request::DecodedParams';

sub _build_params_decoder { return JSON::
m_json($value) }
            catch { $decoder->from_json( $decoder->to_json($value) ) };
    }
    return $decoded_param;
}

1;

__END__

=head1 NAME

Catalyst::TraitFor::Request::DecodedParams::JSON
or;

    __PACKAGE__->apply_request_class_roles(qw/
        Catalyst::TraitFor::Request::DecodedParams::JSON
    /);

=head1 AUTHOR & LICENSE

See L<Catalyst::TraitFor::Request::DecodedParams>.

=cut
App-get_flash_videos ( M/MO/MONSIEUR/App-get_flash_videos-1.24.tar.gz, MONSIEUR, 2010; MetaCPAN )
App-get_flash_videos/lib/FlashVideo/JSON.pm ( view source; MetaCPAN )
age FlashVideo::JSON;
# Very simple JSON parser, loosely based on
# http://code.google.com/p/json-sans-eval
# Public domain.

use strict;
use base 'Exporter';
our @EXPORT = qw(from_json);

my $number 
^\0-\x08\x0a-\x1f\"\\]|\\(?:["/\\bfnrt]|u[0-9A-Fa-f]{4}))};
my $string = qr{(?:"$oneChar*")};
my $jsonToken = qr{(?:false|true|null|[\{\}\[\]]|$number|$string)};
my $escapeSequence = qr{\\(?:([^u])|u(
  'f' => "\f",
  'n' => "\xA",
  'r' => "\xD",
  't' => "\t"
);

sub from_json {
  my($in) = @_;

  my @tokens = $in =~ /$jsonToken/go;
  my $result = $tokens[0] eq '{' ? {} : [];
  # Handle something
JSON-PP-Compat5005 ( M/MA/MAKAMAKA/JSON-PP-Compat5005-1.10.tar.gz, MAKAMAKA, 2010; MetaCPAN )
JSON-PP-Compat5005/lib/JSON/PP/Compat5005.pm ( view source; MetaCPAN )
kage JSON::PP::Compat5005;

use 5.005;
use strict;

BEGIN {
    if ( $] >= 5.006 ) {
        require Carp;
        die( "JSON::PP::Compat5005 is for Perl 5.005" );
    }
}

my @properties;

$JSON::PP:
JSON::PP::JSON_PP_encode_ascii      = \&_encode_ascii;
    *JSON::PP::JSON_PP_encode_latin1     = \&_encode_latin1;
    *JSON::PP::JSON_PP_decode_surrogates = \&_decode_surrogates;
    *JSON::PP::JSON
alid escaped unicode");
    }

    return pack('B*', $utf8bit);
}


sub JSON::PP::incr_text {
    $_[0]->{_incr_parser} ||= JSON::PP::IncrParser->new;

    if ( $_[0]->{_incr_parser}->{incr_parsing} )
JSON-PP-Compat5006 ( M/MA/MAKAMAKA/JSON-PP-Compat5006-1.09.tar.gz, MAKAMAKA, 2010; MetaCPAN )
JSON-PP-Compat5006/lib/JSON/PP/Compat5006.pm ( view source; MetaCPAN )
ckage JSON::PP::Compat5006;

use 5.006;
use strict;

BEGIN {
    if ( $] >= 5.008 ) {
        require Carp;
        die( "JSON::PP::Compat5006 is for Perl 5.6" );
    }
}

my @properties;

$JSON::PP::
JSON::PP::JSON_PP_encode_ascii      = \&_encode_ascii;
    *JSON::PP::JSON_PP_encode_latin1     = \&_encode_latin1;
    *JSON::PP::JSON_PP_decode_surrogates = \&JSON::PP::_decode_surrogates;
    *JSON
::PP::JSON_PP_decode_unicode    = \&JSON::PP::_decode_unicode;

    unless ( defined &B::SVp_NOK ) { # missing in B module.
        eval q{ sub B::SVp_NOK () { 0x02000000; } };
    }

}



sub _encode
Apache2-REST ( J/JE/JETEVE/Apache2-REST-0.07.tar.gz, JETEVE, 2010; MetaCPAN )
Apache2-REST/lib/Apache2/REST/Writer/json.pm ( view source; MetaCPAN )
package Apache2::REST::Writer::json ;
use strict ;

use JSON::XS ;

use Data::Dumper ;

=head1 NAME

Apache2::REST::Writer::json - Apache2::REST::Response Writer for json

=cut

=head2 new

=cut

sub 
ication/json' ;
}

=head2 asBytes

Returns the response as json UTF8 bytes for output.

=cut

sub asBytes{
    my ($self,  $resp ) = @_ ;
    
    #Shallow unblessed copy of response
    # JSON wont o
utput blessed object not implementing the TO_JSON request
    my %resp = %$resp ;
    my $coder = JSON::XS->new->allow_blessed(0)->utf8;
    ## These are bytes. This is correct.
    return $coder->enc
JSON-DWIW ( D/DO/DOWENS/JSON-DWIW-0.47.tar.gz, DOWENS, 2010; MetaCPAN )
JSON-DWIW/lib/JSON/DWIW/Boolean.pm ( view source; MetaCPAN )
ME

JSON::DWIW::Boolean - Return a true or false value when evaluated
in boolean context -- to be used with JSON::DWIW->encode() to
explicitly specify a boolean value.`

=head1 SYNOPSIS

 use JSON::DW
IW;
 my $val1 = JSON::DWIW->true;
 my $val2 = JSON::DWIW->false;
 
 # or
 
 use JSON::DWIW::Boolean;
 my $val1 = JSON::DWIW::Boolean->new(1); # true value
 my $val2 = JSON::DWIW::Boolean->new(0); # fa
 of L<JSON::DWIW> to specify that a true or false
value should be output when converting to JSON, since Perl does
not have explicit values for true and false.

Overloading is used, so if a L<JSON::DWI
JSON-DWIW ( D/DO/DOWENS/JSON-DWIW-0.47.tar.gz, DOWENS, 2010; MetaCPAN )
JSON-DWIW/lib/JSON/DWIW.pm ( view source; MetaCPAN )
ME

JSON::DWIW - JSON converter that Does What I Want

=head1 SYNOPSIS

 use JSON::DWIW;
 my $json_obj = JSON::DWIW->new;
 my $data = $json_obj->from_json($json_str);
 my $str = $json_obj->to_json($da
string) = $json_obj->from_json($json_str);
 
 my $data = JSON::DWIW::deserialize($json_str);
 my $error_str = JSON::DWIW::get_error_string();
 
 use JSON::DWIW qw/deserialize_json from_json/
 my $data
serialize_json($json_str);
 my $error_str = JSON::DWIW::get_error_string();
 
 my $error_string = $json_obj->get_error_string;
 my $error_data = $json_obj->get_error_data;
 my $stats = $json_obj->get_
Net-HTTP-API ( F/FR/FRANCKC/Net-HTTP-API-0.14.tar.gz, FRANCKC, 2010; MetaCPAN )
Net-HTTP-API/lib/Net/HTTP/API/Parser/JSON.pm ( view source; MetaCPAN )
t::HTTP::API::Parser::JSON;
BEGIN {
  $Net::HTTP::API::Parser::JSON::VERSION = '0.14';
}

# ABSTRACT: Parse JSON

use JSON;
use Moose;
extends 'Net::HTTP::API::Parser';

has _json_parser => (
    is  
    => 'rw',
    isa     => 'JSON',
    lazy    => 1,
    default => sub { JSON->new->allow_nonref },
);

sub encode {
    my ($self, $content) = @_;
    $self->_json_parser->encode($content);
}

sub 
e {
    my ($self, $content) = @_;
    $self->_json_parser->decode($content);
}

1;


__END__
=pod

=head1 NAME

Net::HTTP::API::Parser::JSON - Parse JSON

=head1 VERSION

version 0.14

=head1 SYNOPSI
Catalyst-Plugin-Server-JSONRPC ( J/JL/JLMARTIN/Catalyst-Plugin-Server-JSONRPC-0.07.tar.gz, JLMARTIN, 2010; MetaCPAN )
Catalyst-Plugin-Server-JSONRPC/lib/JSON/RPC/Common/Marshal/Catalyst.pm ( view source; MetaCPAN )
package JSON::RPC::Common::Marshal::Catalyst;
use Moose;

use Carp qw(croak);

extends qw(JSON::RPC::Common::Marshal::HTTP);

#OVERRIDE TO CATALYST REQUEST
sub post_request_to_call {
	my ( $self, $req
equest body
    my $body    = $request->body;
    my $content = do { local $/; <$body> };
	$self->json_to_call( $content );
}

sub write_result_to_response {
        my ( $self, $result, $response, @a
->$key(delete $args{$key});
                }
        }

        #Copied from base class
        #JSON::RPC::Common::Marshal::HTTP introduced a "die" here. The
        # following keys where left over
Apache-Voodoo ( M/MA/MAVERICK/Apache-Voodoo-3.0200.tar.gz, MAVERICK, 2010; MetaCPAN )
Apache-Voodoo/lib/Apache/Voodoo/View/JSON.pm ( view source; MetaCPAN )
package Apache::Voodoo::View::JSON;

$VERSION = "3.0200";

use strict;
use warnings;

use JSON::DWIW;

use base("Apache::Voodoo::View");

sub init {
	my $self   = shift;
	my $config = shift;

	$self->
content_type('application/javascript');

	$self->{json} = JSON::DWIW->new({
		'bad_char_policy' => 'convert',
		'pretty' => ($config->{dynamic_loading})?1:0
	});
}

sub params {
	my $self = shift;

	i
or'}   = 1;

	$self->{data} = $d;
}

sub output {
	my $self = shift;

	return scalar($self->{json}->to_json($self->{data}));
}

sub finish {
	my $self = shift;

	$self->{data} = {};
}

sub _stack_trac

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.