Group
Extension

Matches 35358

OpenGuides ( B/BO/BOB/OpenGuides-0.70.tar.gz, BOB, 2012; MetaCPAN )
OpenGuides/lib/OpenGuides/JSON.pm ( view source; MetaCPAN )
package OpenGuides::JSON;

use strict;

use vars qw( $VERSION );
$VERSION = '0.03';

use Wiki::Toolkit::Plugin::JSON;
use Time::Piece;
use URI::Escape;
use Carp 'croak';
use JSON;
use OpenGuides::CGI;
rsion}       = $args{og_version};

    $self;
}

=over 4

=item B<emit_json>

Renders the given node as JSON

=cut

sub emit_json {
    my ( $self, %args ) = @_;

    my $node_name = $args{node};
    
f->json_maker->make_json($data);
}

=item B<output_as_json>

Renders the given arbitary data as JSON

=cut

sub output_as_json {
    my ( $self, %args ) = @_;
    return $self->json_maker->make_json(\
Data-Printer-Filter-JSON ( N/NU/NUBA/Data-Printer-Filter-JSON-0.3.tar.gz, NUBA, 2012; MetaCPAN )
Data-Printer-Filter-JSON/lib/Data/Printer/Filter/JSON.pm ( view source; MetaCPAN )
ilter::JSON;

use 5.006;
use strict;
use warnings 'all';
use Carp;

use Data::Printer::Filter qw/filter p/;
use Term::ANSIColor;

our $VERSION = '0.3';

=head1 NAME

Data::Printer::Filter::JSON - pret
ty-print your decoded JSON structures!

=head1 VERSION

Version 0.03

=head1 SYNOPSIS

# In your program:

    use Data::Printer filters => {
        -external => [ 'JSON' ],
    };

# or, in your C<.
l => [ 'JSON' ],
        },
    };

# You can also tweak the colors:

    use Data::Printer {
        filters => {
            -external   => [ 'JSON' ],
        }, color => {
            JSON  => {
 
eBay-API-Simple ( T/TK/TKEEFER/eBay-API-Simple-0.29.tar.gz, TKEEFER, 2012; MetaCPAN )
eBay-API-Simple/lib/eBay/API/Simple/JSON.pm ( view source; MetaCPAN )
package eBay::API::Simple::JSON;

use strict;
use warnings;

use base 'eBay::API::SimpleBase';
use JSON;
use HTTP::Request;
use HTTP::Headers;
use XML::Simple;
use URI::Escape;
use utf8;

our $DEBUG =
 0;

=head1 NAME 

eBay::API::Simple::JSON - Support for grabbing an RSS feed via API call

=head1 USAGE

  my $api = eBay::API::Simple::JSON->new();

  my $data = {     
    "user_eais_token" => "tim
$endpoint );
  
=head1 PUBLIC METHODS

=head2 new( { %options } } 

my $call = ebay::API::Simple::JSON->new();

=cut

sub new {
    my $class = shift;
    my $self  = $class->SUPER::new(@_);

    $sel
Inline-JSON ( K/KI/KILNA/Inline-JSON-v1.0.4.tar.gz, KILNA, 2012; MetaCPAN )
Inline-JSON/lib/Inline/JSON.pm ( view source; MetaCPAN )

package Inline::JSON;

use v5.10;
use strict;
use warnings;
no warnings 'once';

use Filter::Simple;
use JSON;

# This is using recursive balanced regex as per:
# http://learn.perl.org/faq/perlfaq6.h
 {
        s/
            (                         # Outer capture group 1 start
                json: (\s*)           # Capture group 2 (space) start
                (                     # Capture 
 )
        /
            my $space = $2;
            my $json = $3;
            $json =~ s|'|\\'|;
            $space."JSON->new->decode('$json')";
        /gsex;
    },
    'executable' => sub {
    
Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia/View/JSON.pm ( view source; MetaCPAN )
package Ambrosia::View::JSON;
use strict;
use warnings;
use Carp;

use JSON::XS ();

use Ambrosia::Meta;

class sealed
{
    extends => [qw/Ambrosia::View/],
};

our $VERSION = 0.010;

sub process
{
 
 return $self->as_json;
}

sub as_json
{
    my $self = shift;

    my $json = JSON::XS->new;
    $json->utf8(0);
    $json->latin1(1);

    my $str = '';
    eval
    {
        $json->convert_blessed
elf->data ? $json->encode($self->data) : '{}';
warn "$str\n";
    };
    if ( $@ )
    {
        carp "ERROR: $@";
    }

    return $str;
}

1;

__END__

=head1 NAME

Ambrosia::View::JSON - it is VIE
MARC-File-JSON ( C/CF/CFOUTS/MARC-File-JSON-0.001.tar.gz, CFOUTS, 2012; MetaCPAN )
MARC-File-JSON/lib/MARC/File/JSON.pm ( view source; MetaCPAN )
package MARC::File::JSON;

# ABSTRACT: read/write MARC data into JSON format

use strict;
use warnings;
use JSON;
use JSON::Streaming::Reader;
use MARC::Record::Generic;
use MARC::Record;
use MARC::Fi

push @ISA, 'MARC::File';

# MARC::Record -> JSON
sub encode {
    my $record = shift;
    return JSON->new->utf8->encode( $record->as_generic );
}

# JSON -> MARC::Record
sub decode {
    my ($self, 
    $data = JSON->new->utf8->decode( $data );
    }
    return MARC::Record->new_from_generic( $data );
}

sub _next {
    my $self = shift;
    my $jsonr
        = $self->{jsonr} //= JSON::Streaming:
File-ANVL ( J/JA/JAK/File-ANVL-1.05.tar.gz, JAK, 2012; MetaCPAN )
File-ANVL/lib/File/OM.pm ( view source; MetaCPAN )
ocal $Text::Wrap::huge = 'overflow';

our %outputformats = (
	anvl	=> 'ANVL',
	csv	=> 'CSV',
	json	=> 'JSON',
	plain	=> 'Plain',
	psv	=> 'PSV',
	turtle	=> 'Turtle',
	xml	=> 'XML',
);

sub listformats 
rall starting indent
	indent_step	=>	# how much to increment/decrement indent
		'  ',		# for XML, JSON
	outhandle	=> '',	# return string by default
	turtle_indent	=>	# turtle has one indent width
		' 
/"/;	# trim both ends and double-quote

	return $s;
}

package File::OM::JSON;

our @ISA = ('File::OM');

sub elem {	# OM::JSON
	my $self = shift;
	my ($name, $value, $lineno, $elemnum) = (shift, shif
App-AltSQL ( E/EW/EWATERS/App-AltSQL-0.05.tar.gz, EWATERS, 2012; MetaCPAN )
App-AltSQL/lib/App/AltSQL/Plugin/Dump/Format/json.pm ( view source; MetaCPAN )
in::Dump::Format::json;

use Moose::Role;
use JSON;

sub format {
    my ($self, %params) = @_;
    my $data = $self->_convert_to_array_of_hashes($params{table_data});
    return JSON->new->encode($da
Data-Properties-JSON ( J/JO/JOHND/Data-Properties-JSON-0.004.tar.gz, JOHND, 2012; MetaCPAN )
Data-Properties-JSON/lib/Data/Properties/JSON.pm ( view source; MetaCPAN )

package Data::Properties::JSON;

use strict;
use warnings 'all';
use JSON::XS;
our $VERSION = '0.004';


sub new
{
  my ($class, %args) = @_;
  
  if( $args{properties_file} )
  {
    $args{__name} =
 reading: $!";
    local $/;
    $args{data} = decode_json(scalar(<$ifh>));
  }
  elsif( $args{json} )
  {
    $args{data} = decode_json($args{json});
    $args{__name} = 'root';
  }
  elsif( $args{da
ta} )
  {
    $args{__name} ||= 'root';
  }
  else
  {
    die "Neither properties_file nor json nor data were provided.";
  }# end if()
  
  my $s = bless \%args, $class;
  if( ref($s->{data}) eq 'HA
App-PipeFilter ( R/RC/RCAPUTO/App-PipeFilter-0.005.tar.gz, RCAPUTO, 2012; MetaCPAN )
App-PipeFilter/lib/App/PipeFilter/Role/Output/Json.pm ( view source; MetaCPAN )
ole::Output::Json;
{
  $App::PipeFilter::Role::Output::Json::VERSION = '0.005';
}

use Moose::Role;

use JSON::XS;

sub encode_output {
  # Skips $self in $_[0].
  return map { encode_json($_) . "\n" 
E

App::PipeFilter::Role::Output::Json - serialize output as one JSON object per line

=head1 VERSION

version 0.005

=head1 SYNOPSIS

  package App::PipeFilter::JsonToYaml;

  use Moose;

  extends '
peFilter::Role::Input::Json
    App::PipeFilter::Role::Transform::None
    App::PipeFilter::Role::Output::Yaml
  );

  1;

=head1 DESCRIPTION

App::PipeFilter::Role::Output::Json provides an encode_ou
App-PipeFilter ( R/RC/RCAPUTO/App-PipeFilter-0.005.tar.gz, RCAPUTO, 2012; MetaCPAN )
App-PipeFilter/lib/App/PipeFilter/Role/Input/Json.pm ( view source; MetaCPAN )
Json;
{
  $App::PipeFilter::Role::Input::Json::VERSION = '0.005';
}

use Moose::Role;

use JSON::XS;

has _json => (
  is      => 'rw',
  isa     => 'JSON::XS',
  lazy    => 1,
  default => sub { JSON
) = $self->_json()->incr_parse($$buffer_ref);
  $$buffer_ref = "";
  return @return;
}

1;

__END__

=pod

=head1 NAME

App::PipeFilter::Role::Input::Json - parse input as a stream of JSON records

=h
ic::Json;

  use Moose;

  extends 'App::PipeFilter::Generic';

  with qw(
    App::PipeFilter::Role::Reader::Sysread
    App::PipeFilter::Role::Input::Json
    App::PipeFilter::Role::Output::Json
  )
App-PipeFilter ( R/RC/RCAPUTO/App-PipeFilter-0.005.tar.gz, RCAPUTO, 2012; MetaCPAN )
App-PipeFilter/lib/App/PipeFilter/Generic/Json.pm ( view source; MetaCPAN )
package App::PipeFilter::Generic::Json;
{
  $App::PipeFilter::Generic::Json::VERSION = '0.005';
}

use Moose;

extends 'App::PipeFilter::Generic';

with qw(
  App::PipeFilter::Role::Reader::Sysread
  
rint
  App::PipeFilter::Role::Input::Json
  App::PipeFilter::Role::Output::Json
);

1;

__END__

=pod

=head1 NAME

App::PipeFilter::Generic::Json - a generic JSON pipeline filter

=head1 VERSION

ver
::PipeFilter::JsonCat;

  use Moose;
  extends 'App::PipeFilter::Generic::Json';
  with 'App::PipeFilter::Role::Transform::None';

  1;

=head1 DESCRIPTION

App::PipeFilter::Generic::Json is a generic
Log-JSON ( K/KA/KABLAMO/Log-JSON-0.001.tar.gz, KABLAMO, 2012; MetaCPAN )
Log-JSON/lib/Log/JSON.pm ( view source; MetaCPAN )
package Log::JSON;
use Moose;
use MooseX::Types::Path::Class;

use Carp;
use DateTime;
use English;
use JSON;
use Path::Class::File;

our $VERSION = '0.001'; # VERSION

has 'date' => ( is => 'ro', isa
json = JSON->new->canonical->encode( \%data );

    if ( $self->remove_newlines ) {
        $json =~ s/\n//g;
        $json =~ s/\r//g;
    }

    my $fh = $self->file->open('>>');
    print $fh $json
Log data to a file as JSON


1;

__END__
=pod

=encoding utf-8

=head1 NAME

Log::JSON - Log data to a file as JSON

=head1 SYNOPSIS

    use Log::JSON;
    my $logger = Log::JSON->new(
        file  
Sledge-Plugin-JSON-XS ( T/TO/TOKUHIROM/Sledge-Plugin-JSON-XS-0.05.tar.gz, TOKUHIROM, 2012; MetaCPAN )
Sledge-Plugin-JSON-XS/lib/Sledge/Plugin/JSON/XS.pm ( view source; MetaCPAN )
package Sledge::Plugin::JSON::XS;
use strict;
use warnings;
use 5.00800;
use JSON::XS;
use Encode ();

our $VERSION = '0.05';
our $ConformToRFC4627 = 0;
our $ENCODING = 'utf-8';

sub import {
    my $
pkg = caller(0);

    no strict 'refs'; ## no critic.
    *{"$pkg\::output_json_xs"} = \&_output_json_xs;
}

sub _output_json_xs {
    my ($self, $src) = @_;

    my $content_type =
        ( $self->d
e($self, $ENCODING );

    my $json = encode_json($src);
    my $output = _add_callback($self, _validate_callback_param($self, ($self->r->param('callback') || '')), $json );
    $self->r->content_type
JSON-HPack ( G/GV/GVENKAT/JSON-HPack-0.0.3.tar.gz, GVENKAT, 2012; MetaCPAN )
JSON-HPack/lib/JSON/HPack.pm ( view source; MetaCPAN )
e JSON::HPack;

use common::sense;
use constant FIRST => 0;
use JSON::Any;

our $VERSION = q(0.0.3);


=head1 NAME 

JSON-HPack - JSON Homogeneous Collections Compressor 

=head1 SYNOPSIS

  use JSON:
:HPack; 

  JSON::HPack->pack( [ 
    {
      name => 'Larry Wall',
      nick  => 'timtowtdi' 
    }
  ] );

  # - OR -

  JSON::HPack->dump( [
    {
      name => 'Larry Wall',
      nick  => 'timto
# To Unpack
  JSON::HPack->unpack(
    [ 2, 'name', 'nick', 'Larry Wall', 'timtowdi' ]
  )

  # - OR use JSON string directly
  JSON::HPack->load( $json_string )

=head1 DESCRIPTION

JSON HPack perl i
KinoSearch ( C/CR/CREAMYG/KinoSearch-0.315.tar.gz, CREAMYG, 2012; MetaCPAN )
KinoSearch/lib/KinoSearch/Util/Json.pm ( view source; MetaCPAN )
package KinoSearch::Util::Json;
use KinoSearch;

1;

__END__

__COPYRIGHT__

Copyright 2005-2011 Marvin Humphrey

This program is free software; you can redistribute it and/or modify
under the same te
IRC-Indexer ( A/AV/AVENJ/IRC-Indexer-0.06.tar.gz, AVENJ, 2012; MetaCPAN )
IRC-Indexer/lib/IRC/Indexer/Output/JSON.pm ( view source; MetaCPAN )
dexer::Output::JSON;

use strict;
use warnings;
use JSON::XS;

require IRC::Indexer::Output;
our @ISA = qw/IRC::Indexer::Output/;

sub dump {
  my ($self) = @_;
  $self->{Output} = JSON::XS->new->utf8
lf->{Output} = JSON::XS->new->utf8(1)->indent->encode(
    $self->{Input}
  ) . "\n" ;

  $self->SUPER::write($path);
}

1;
__END__

=pod

=head1 NAME

IRC::Indexer::Output::JSON - JSON::XS output sub
class

=head1 DESCRIPTION

L<IRC::Indexer::Output> subclass serializing via L<JSON::XS>.

See L<IRC::Indexer::Output> for usage details.

=head1 AUTHOR

Jon Portnoy <avenj@cobaltirc.org>

=cut
KinoSearch ( C/CR/CREAMYG/KinoSearch-0.315.tar.gz, CREAMYG, 2012; MetaCPAN )
KinoSearch/lib/KinoSearch.pm ( view source; MetaCPAN )
:Util::Json;
    use Scalar::Util qw( blessed );
    use KinoSearch qw( to_clownfish );
    use KinoSearch::Util::StringHelper qw( utf8_valid utf8_flag_on );
    use JSON::XS qw();

    my $json_encod
_json {
        my ( undef, %args ) = @_;
        my $result;
        my $instream = $args{folder}->open_in( $args{path} )
            or return;
        my $len = $instream->length;
        my $json;
      $instream->read( $json, $len );
        if ( utf8_valid($json) ) {
            utf8_flag_on($json);
            $result = eval { to_clownfish( $json_encoder->decode($json) ) };
        }
       
JSON-RPC-Dispatcher-ClassMapping ( S/SH/SHERWIN/JSON-RPC-Dispatcher-ClassMapping-0.03.tar.gz, SHERWIN, 2012; MetaCPAN )
JSON-RPC-Dispatcher-ClassMapping/lib/JSON/RPC/Dispatcher/ClassMapping.pm ( view source; MetaCPAN )
package JSON::RPC::Dispatcher::ClassMapping;

use strict;
use warnings;
our $VERSION = '0.03';

use JSON::RPC::Dispatcher 0.0505;
use Moose;
use namespace::autoclean;

# XXX: Hack to relax "method" co
nstraint of J::R::D::P so that it accepts "."
{
package
    JSON::RPC::Dispatcher::Procedure; # hide from PAUSE/indexers
use Moose;

__PACKAGE__->meta->make_mutable;
has method  => (
    is      => 'r
immutable;
}


has 'rpc' => (
    is      => 'rw', 
    isa     => 'Object',
    default => sub { JSON::RPC::Dispatcher->new },
    handles => [ 'to_app', 'register' ],
);

has 'dispatch' => (
    is 
Google-Data-JSON ( T/TA/TAKERU/Google-Data-JSON-v0.1.10.tar.gz, TAKERU, 2012; MetaCPAN )
Google-Data-JSON/lib/Google/Data/JSON.pm ( view source; MetaCPAN )
package Google::Data::JSON;

use warnings;
use strict;

use version; our $VERSION = qv('0.1.10');

use File::Slurp;
use JSON::Any;
use List::MoreUtils qw( any uniq );
use Perl6::Export::Attrs;
use Sto
$type eq 'json' || $type eq 'hash' || $type eq 'atom';
    return __PACKAGE__->error("Bad stream: $type => $stream")
        if ($type eq 'xml'  && $stream !~ /^</)
        || ($type eq 'json' && $str
isa($stream, 'HASH')            ? 'hash'
         : $stream  =~ /^\{/                          ? 'json'
         : $stream  =~ /^</                           ? 'xml'
         : __PACKAGE__->error("Bad

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