Group
Extension

Matches 35358

Dist-Maker ( G/GF/GFUJI/Dist-Maker-0.06.tar.gz, GFUJI, 2012; MetaCPAN )
Dist-Maker/lib/Dist/Maker/Template/DefaultMB.pm ( view source; MetaCPAN )

hotspots
immutabilize
immutabilizes
immutabilized
inline
inlines
invocant
invocant's
irc
IRC
isa
JSON
login
namespace
namespaced
namespaces
namespacing
OO
OOP
ORM
overridable
parameterizable
paramete
Data-Validator ( G/GF/GFUJI/Data-Validator-1.02.tar.gz, GFUJI, 2012; MetaCPAN )
Data-Validator/lib/Data/Validator.pm ( view source; MetaCPAN )
but
less smart.

This is designed for general data validation. For example, it is useful for CSV, JSON, XML, and so on.

=head2 Concepts

=over

=item Natural as Perl code

I love C<Smart::Args> becau
Kossy ( K/KA/KAZEBURO/Kossy-0.13.tar.gz, KAZEBURO, 2012; MetaCPAN )
Kossy/lib/Kossy/Assets.pm ( view source; MetaCPAN )
fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").t
{try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);f
n!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"
MojoX-Dispatcher-Qooxdoo-Jsonrpc ( M/MB/MBP/MojoX-Dispatcher-Qooxdoo-Jsonrpc-0.89.tar.gz, MBP, 2012; MetaCPAN )
MojoX-Dispatcher-Qooxdoo-Jsonrpc/lib/MojoX/Dispatcher/Qooxdoo/Jsonrpc.pm ( view source; MetaCPAN )
Jsonrpc;

use strict;
use warnings;

use Mojo::JSON;
use Mojo::Base 'Mojolicious::Controller';
use Encode;

our $toUTF8 = find_encoding('utf8');

our $VERSION = '0.89';

has 'JSON' => sub { Mojo::JSON
use
    # the data is not sent in the same place..
    my $log = $self->app->log;

    my $json = $self->JSON;

    # send warnings to log file preserving the origin
    local $SIG{__WARN__} = sub {
 
method ){
        /^POST$/ && do {
            # Data comes as JSON object, so fetch a reference to it
            $data           = $json->decode($self->req->body);
            $id             = $dat
App-Presto ( B/BP/BPHILLIPS/App-Presto-0.009.tar.gz, BPHILLIPS, 2012; MetaCPAN )
App-Presto/lib/App/Presto/Command/headers.pm ( view source; MetaCPAN )
1,
                desc => 'Set content-type header',
                args => sub { ['application/json','application/x-www-form-urlencoded'] },
                proc    => sub { $client->set_header( 'C
App-Presto ( B/BP/BPHILLIPS/App-Presto-0.009.tar.gz, BPHILLIPS, 2012; MetaCPAN )
App-Presto/lib/App/Presto/Command/config.pm ( view source; MetaCPAN )
 data structures to STDOUT',
                        args => sub {
                            [ 'JSON', 'Data::Dumper', 'Data::Dump', 'YAML' ];
                        },
                        proc
Net-HTTP-Spore ( F/FR/FRANCKC/Net-HTTP-Spore-0.05.tar.gz, FRANCKC, 2012; MetaCPAN )
Net-HTTP-Spore/lib/Net/HTTP/Spore/Middleware/Auth/Header.pm ( view source; MetaCPAN )
ad1 VERSION

version 0.05

=head1 SYNOPSIS

    my $client = Net::HTTP::Spore->new_from_spec('api.json');
    $client->enable(
        'Auth::Header',
        header_name  => 'X-API-Auth',
        hea
App-Toodledo ( P/PJ/PJS/App-Toodledo-2.16.tar.gz, PJS, 2012; MetaCPAN )
App-Toodledo/lib/App/Toodledo.pm ( view source; MetaCPAN )
Digest::MD5 'md5_hex';
use Moose;
use MooseX::Method::Signatures;
use MooseX::ClassAttribute;
use JSON;
use URI::Encode qw(uri_encode);
use LWP::UserAgent;
use Date::Parse;
use YAML qw(LoadFile DumpFi
$res->code != 200
    and $self->log->logdie( "Unable to contact Toodledo\n");
  my $ref = decode_json( $res->content )
    or $self->log->logdie( "Content invalid\n");

  $self->log->logdie( $ref->{e
XDI ( H/HO/HORST/XDI-0.05.tar.gz, HORST, 2012; MetaCPAN )
XDI/lib/XDI/Connection.pm ( view source; MetaCPAN )
TP::Request->new( 'POST', $server);
	my $ua = new LWP::UserAgent;
	my $cheader = 'application/xdi+json';
	if ($context) {
		$cheader .= ';contexts=1';
	}
	$request->header('accept' => $cheader);
	$req
", $response->status_line;
		return undef;
	}
		
}

sub _xdi_response {
	my ($json) = @_;
	my $struct = XDI::_decode($json);
	if (defined $struct) {
		my $tuple = XDI::pick_xdi_tuple($struct,['$false$
 is a JSON encoded representation of the nodes requested in the $get operation.  Other
operations will return an empty hash {} upon success.  Default behavior is to automatically convert
the JSON to a
App-Toodledo ( P/PJ/PJS/App-Toodledo-2.16.tar.gz, PJS, 2012; MetaCPAN )
App-Toodledo/lib/App/Toodledo/Util.pm ( view source; MetaCPAN )
trict;
use warnings;

our $VERSION = '1.00';

use base qw(Exporter);

use File::HomeDir qw();
use JSON;

our @EXPORT_OK = qw(debug toodledo_encode toodledo_decode toodledo_time
		     arg_encode home 
PP_TOODLEDO_DEBUG};
}


sub arg_encode
{
  local $_ = shift;

  s/\n/\\n/g;
  ref $_
    ? encode_json( $_ )
    : $_;
}


sub toodledo_encode
{
  local $_ = shift;

  s/&/%26/g;
  s/;/%3B/g;
  $_;
}
1;

__END__

=head1 NAME

=head1 SYNOPSIS

=head1 DESCRIPTION

=head1 METHODS

=head2 arg_encode

JSON encoding for parameters submitted to the API.

=head2 home

User's home directory.  Broken out so
MooseX-Storage ( B/BO/BOBTFISH/MooseX-Storage-0.32.tar.gz, BOBTFISH, 2012; MetaCPAN )
MooseX-Storage/lib/MooseX/Storage/Format/YAML.pm ( view source; MetaCPAN )
 YAML string
  $p->freeze();

  # ----
  # __CLASS__: "Point"
  # x: 10
  # y: 10

  # unpack the JSON string into a class
  my $p2 = Point->thaw(<<YAML);
  ----
  __CLASS__: "Point"
  x: 10
  y: 10
 
AnyEvent-HTTP-ScopedClient ( A/AA/AANOAA/AnyEvent-HTTP-ScopedClient-0.0.3.tar.gz, AANOAA, 2012; MetaCPAN )
AnyEvent-HTTP-ScopedClient/lib/AnyEvent/HTTP/ScopedClient.pm ( view source; MetaCPAN )

    );

    # Content-Type: application/json
    use JSON::XS;
    $client->header('Content-Type', 'application/json')
        ->post(
            encode_json({ foo => 1 }),
            sub {
       
 = @_;
                # ...
            }
        );

    $client->header('Accept', 'application/json')
        ->query({ key => 'value' })
        ->query('key', 'value')
        ->get(
            
MooseX-Storage ( B/BO/BOBTFISH/MooseX-Storage-0.32.tar.gz, BOBTFISH, 2012; MetaCPAN )
MooseX-Storage/lib/MooseX/Storage/IO/AtomicFile.pm ( view source; MetaCPAN )
head1 SYNOPSIS

  package Point;
  use Moose;
  use MooseX::Storage;

  with Storage('format' => 'JSON', 'io' => 'AtomicFile');

  has 'x' => (is => 'rw', isa => 'Int');
  has 'y' => (is => 'rw', isa 
methods to load/store a class
  ## on the file system

  $p->store('my_point.json');

  my $p2 = Point->load('my_point.json');

=head1 METHODS

=over 4

=item B<load ($filename)>

=item B<store ($file
MooseX-Storage ( B/BO/BOBTFISH/MooseX-Storage-0.32.tar.gz, BOBTFISH, 2012; MetaCPAN )
MooseX-Storage/lib/MooseX/Storage/IO/File.pm ( view source; MetaCPAN )
head1 SYNOPSIS

  package Point;
  use Moose;
  use MooseX::Storage;

  with Storage('format' => 'JSON', 'io' => 'File');

  has 'x' => (is => 'rw', isa => 'Int');
  has 'y' => (is => 'rw', isa => 'In
methods to load/store a class
  ## on the file system

  $p->store('my_point.json');

  my $p2 = Point->load('my_point.json');

=head1 METHODS

=over 4

=item B<load ($filename)>

=item B<store ($file
XDI ( H/HO/HORST/XDI-0.05.tar.gz, HORST, 2012; MetaCPAN )
XDI/lib/XDI.pm ( view source; MetaCPAN )
ION = '0.05';

use strict;
use warnings;

use Carp;
use Log::Log4perl qw(get_logger :levels);
use JSON::XS;
use Data::Dumper;
use Data::UUID;
use Storable qw(dclone);
use Clone qw(clone);

use XDI::Co
get_logger();
	my $struct;
	eval {
		$struct = JSON::XS::->new->pretty(1)->decode($string);
	};
	if ($@ && not defined $struct) {
		carp("Not a valid JSON string");
		carp($@);
		return undef;
	} else
 is a JSON encoded representation of the nodes requested in the $get operation.  Other
operations will return an empty hash {} upon success.  Default behavior is to automatically convert
the JSON to a
WWW-Foursquare ( F/FX/FXZUZ/WWW-Foursquare-0.9906.tar.gz, FXZUZ, 2012; MetaCPAN )
WWW-Foursquare/lib/WWW/Foursquare.pm ( view source; MetaCPAN )
;
use WWW::Foursquare::Events;
use WWW::Foursquare::Pages;
use WWW::Foursquare::Pageupdates;

use JSON;
use LWP;
use URI::Escape;

sub new {
    my ($class, %params) = @_;
    
    my $self = {};
    
l" if $self->{debug};

    my $res = $self->{request}->{ua}->get($result_url);

    return decode_json($res->content()) if $res->code() == 200;

    # throw exception
    die $res->content();
}

sub _
Net-HTTP-Spore ( F/FR/FRANCKC/Net-HTTP-Spore-0.05.tar.gz, FRANCKC, 2012; MetaCPAN )
Net-HTTP-Spore/lib/Net/HTTP/Spore/Response.pm ( view source; MetaCPAN )
;

    my $response = Net::HTTP::Spore::Response->new(
        200, ['Content-Type', 'application/json'], '{"foo":1}';
    );
    $response->request($request);

=head1 DESCRIPTION

Net::HTTP::Spore::R
hen the body is sets for the first time.

=item content_type

    $res->content_type('application/json');
    my $ct = $res->content_type;

Gets or sets the content type of the response body

=item co
ype' => 'application/json']);

Gets or sets HTTP response headers.

=item header

    my $cl = $res->header('Content-Length');
    $res->header('Content-Type' => 'application/json');

Shortcut for C<<
App-Presto ( B/BP/BPHILLIPS/App-Presto-0.009.tar.gz, BPHILLIPS, 2012; MetaCPAN )
App-Presto/lib/App/Presto/Command/HTTP.pm ( view source; MetaCPAN )
able {
    my $message = shift;
    return $message->content_type =~ m{\b(?:xml|^text|application/json|application/x-www-form-urlencoded)\b} || do {
        my $content = substr($message->decoded_cont
Mojolicious-Plugin-BlogSpam ( A/AK/AKRON/Mojolicious-Plugin-BlogSpam-0.05.tar.gz, AKRON, 2012; MetaCPAN )
Mojolicious-Plugin-BlogSpam/lib/Mojolicious/Plugin/BlogSpam.pm ( view source; MetaCPAN )
age Mojolicious::Plugin::BlogSpam;
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::URL;
use Mojo::JSON;
use Mojo::Log;
use Mojo::UserAgent;
use Scalar::Util 'weaken';

our $VERSION = '0.05';

# Todo: 
 $self->{log}) {

    # Serialize comment
    my $msg = "[$1]: " . ($2 || '') . ' ' .
      Mojo::JSON->new->encode($self->hash);

    # Log error
    if ($1 eq 'ERROR') {
      $log->error($msg);
   
Net-HTTP-Spore ( F/FR/FRANCKC/Net-HTTP-Spore-0.05.tar.gz, FRANCKC, 2012; MetaCPAN )
Net-HTTP-Spore/lib/Net/HTTP/Spore.pm ( view source; MetaCPAN )

  $Net::HTTP::Spore::VERSION = '0.05';
}

# ABSTRACT: SPORE client

use Moose;

use IO::All;
use JSON;
use Carp;
use Try::Tiny;
use Scalar::Util;

use Net::HTTP::Spore::Core;

# XXX should we let the
bject ) = @_;

    my $spec;
    try {
        $spec = JSON::decode_json($string);
    }
    catch {
        Carp::confess( "unable to parse JSON spec: " . $_ );
    };

    try {
        $opts->{base
m_spec('twitter.json');

    # for identica
    my $client = Net::HTTP::Spore->new_from_spec('twitter.json', base_url => 'http://identi.ca/com/api');

    $client->enable('Format::JSON');

    my $tim

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