Group
Extension

Matches 35358

Message-Passing-PSGI ( B/BO/BOBTFISH/Message-Passing-PSGI-0.001.tar.gz, BOBTFISH, 2012; MetaCPAN )
Message-Passing-PSGI/lib/Plack/App/Message/Passing.pm ( view source; MetaCPAN )
r /;
use Message::Passing::Input::ZeroMQ;
use Message::Passing::Output::ZeroMQ;
use JSON qw/ encode_json decode_json /;
use namespace::autoclean;

with qw/
    Message::Passing::Role::Input
    Messag
gix.message.passing.returnaddress'} = $self->return_address;
    $self->output_to->consume(encode_json $env);
    return sub {
        my $responder = shift;
        $self->in_flight->{refaddr($base_e
andle_request($env);
    };
}

sub consume {
    my ($self, $message) = @_;
    $message = decode_json $message;
    my $clientid = $message->{clientid};
    my ($env, $responder) = @{ delete($self->i
Message-Passing-ZeroMQ ( B/BO/BOBTFISH/Message-Passing-ZeroMQ-0.005.tar.gz, BOBTFISH, 2012; MetaCPAN )
Message-Passing-ZeroMQ/lib/Message/Passing/Output/ZeroMQ.pm ( view source; MetaCPAN )
 the message to a string before
sending it. The C<message-pass> utility will do this for you into JSON, or you can
do it manually as shown in the example in L<Message::Passing::ZeroMQ>.

=head1 SEE AL
Message-Passing-ZeroMQ ( B/BO/BOBTFISH/Message-Passing-ZeroMQ-0.005.tar.gz, BOBTFISH, 2012; MetaCPAN )
Message-Passing-ZeroMQ/lib/Message/Passing/ZeroMQ.pm ( view source; MetaCPAN )
age::Passing;
    use Message::Passing::Output::ZeroMQ;
    use Message::Passing::Filter::Encode::JSON;

    my $log = Log::Dispatch->new;

    $log->add(Log::Dispatch::Message::Passing->new(
        
regate_log',
        min_level => 'debug',
        output    => Message::Passing::Filter::Encode::JSON->new(
          output_to => Message::Passing::Output::ZeroMQ->new(
            connect => 'tcp:/
Message-Passing-PSGI ( B/BO/BOBTFISH/Message-Passing-PSGI-0.001.tar.gz, BOBTFISH, 2012; MetaCPAN )
Message-Passing-PSGI/lib/Plack/Handler/Message/Passing.pm ( view source; MetaCPAN )
ent;
use Message::Passing::Output::ZeroMQ;
use Message::Passing::Input::ZeroMQ;
use JSON qw/ encode_json decode_json /;
use Try::Tiny qw/ try catch /;
use Plack::Middleware::BufferedStreaming;
use nam
    socket_type => 'PUB',
    );
}

sub consume {
    my ($self, $msg) = @_;
    my $env = decode_json($msg);
    my $errors;
    open(my $error_fh, '>', \$errors) or die $!;
    $env->{'psgi.errors'}
ength($html),
            ],
            [ $html ]
        ];
    };
    my $return_data = encode_json({
        clientid => $clientid,
        response => $res,
        errors => $errors,
    });
   
App-AltSQL ( E/EW/EWATERS/App-AltSQL-0.05.tar.gz, EWATERS, 2012; MetaCPAN )
App-AltSQL/lib/App/AltSQL/Term.pm ( view source; MetaCPAN )
ckage App::AltSQL::Term;

use Moose;
use Term::ReadLine::Zoid;
use Data::Dumper;
use JSON qw(encode_json decode_json);
use Term::ANSIColor;

with 'App::AltSQL::Role';
with 'MooseX::Object::Pluggable';
		return;
	}

	open my $out, '>', $fn or die "Can't open $fn for writing: $!";
	print $out encode_json({ history => [ $self->term->GetHistory ] });
	close $out;
}

sub read_history {
	my ($self, $fn) 
";
	local $\ = undef;
	my $data = <$in>;
	close $in;

	my @history;
	eval {
		my $parsed = decode_json($data);
		@history = @{ $parsed->{history} };
	};
	if (my $exception = $@) {
		$self->log_error("
File-ANVL ( J/JA/JAK/File-ANVL-1.05.tar.gz, JAK, 2012; MetaCPAN )
File-ANVL/lib/File/ERC.pm ( view source; MetaCPAN )
ord, which
can be represented in a variety of underlying syntaxes, such as ANVL,
Turtle, XML, and JSON.  The ERC elements include Dublin Core Kernel
metadata.

=head1 SEE ALSO

A Metadata Kernel for E
Task-BeLike-RSRCHBOY-Web ( R/RS/RSRCHBOY/Task-BeLike-RSRCHBOY-Web-0.002.tar.gz, RSRCHBOY, 2012; MetaCPAN )
Task-BeLike-RSRCHBOY-Web/lib/Task/BeLike/RSRCHBOY/Web.pm ( view source; MetaCPAN )
ead3 L<HTML::Builder> 0.006

=head3 L<Text::Haml>

=head3 L<Template>

=head3 L<Template::Plugin::JSON::Escape>

=head1 AUTHOR

Chris Weyl <cweyl@alumni.drew.edu>

=head1 COPYRIGHT AND LICENSE

This s
File-ANVL ( J/JA/JAK/File-ANVL-1.05.tar.gz, JAK, 2012; MetaCPAN )
File-ANVL/lib/File/ANVL.pm ( view source; MetaCPAN )
mber of values for keys (eg,
		# for turtle, $$o{subject}).  $recnum is useful for
		# outputting json separators (eg, no comma if $recnum eq 1)
		# or record numbers in comments (eg, if $$o{verbose})
 Specific conversions, based on an "output multiplexer"
L<File::OM>, are possible to XML, Turtle, JSON, CSV, and PSV (Pipe
Separated Value), and Plain unlabeled text.

The B<OM> package can also be us
ively. Array
element 1 always contains a string naming the format of the input, such
as, "ANVL", "JSON", "XML", etc.

The remaining triples are free form except that the values will have been
drawn fr
App-AltSQL ( E/EW/EWATERS/App-AltSQL-0.05.tar.gz, EWATERS, 2012; MetaCPAN )
App-AltSQL/lib/App/AltSQL/Plugin/Dump.pm ( view source; MetaCPAN )
:Dump::Format;

=head1 Name

Dump AltSQL Plugin

=head1 Synopsis

Usage:

 .dump <file>.[csv|html|json|pl|pm|sql|xls|xml|yaml|yml] <query>;

=head1 Description

This plugin will allow you to dump out 
</td><td>Pie</td></tr><tr><td>3</td><td>Cow</td></tr></table>

=end html

JSON:

 .dump out.json select * from users;

out.json:

 [{"name":"Moo","id":"1"},{"name":"Pie","id":"2"},{"name":"Cow","id":"
or("Usage: .dump \$filename \$sql");
        $self->log_error("Available formats: csv, xls, html, json, [pl|pm], sql, xml, [yml|yaml]");

        return 1; # handled, won't run this as a query
    }

Class-ReluctantORM ( C/CL/CLWOLFE/Class-ReluctantORM-0.52_0.tar.gz, CLWOLFE, 2012; MetaCPAN )
Class-ReluctantORM/lib/Class/ReluctantORM.pm ( view source; MetaCPAN )
, where schema data will be cached.  Ignored if schema_cache_policy is NONE.  The file will be in JSON format.  No default provided.

=back

=cut

sub get_global_option {
    my $inv = shift;
    my $
CPAN-Source ( C/CO/CORNELIUS/CPAN-Source-0.04.tar.gz, CORNELIUS, 2012; MetaCPAN )
CPAN-Source/lib/CPAN/Source.pm ( view source; MetaCPAN )
 Cache::File;
use DateTime;
use DateTime::Format::HTTP;
use CPAN::DistnameInfo;
use YAML::XS;
use JSON::XS;

use CPAN::Source::Dist;
use CPAN::Source::Package;

use constant { DEBUG => $ENV{DEBUG} };
       return unless $self->mirror;
        # get 07mirror.json
        my $json = $self->fetch_mirrors;
        my $data = decode_json( $json );
        return $data;
    };

sub debug { 
    say "[D
ist_txt ) );
}

sub recent {
    my ($self,$period) = @_;
    my $json = $self->fetch_recent( $period );
    return decode_json( $json );
}

sub parse_modlist { 
    my ($self,$modlist_data) = @_;

  
Bot-Cobalt-DB-Term ( A/AV/AVENJ/Bot-Cobalt-DB-Term-0.001.tar.gz, AVENJ, 2012; MetaCPAN )
Bot-Cobalt-DB-Term/lib/Bot/Cobalt/DB/Term.pm ( view source; MetaCPAN )
      " Inserts raw data as the value of the specified key.",
      " Note that <data> is usually JSON.",
    ],
 
    putref => [
      "putref <key> <perl data>",
      " Inserts a serialized Perl d
{
    print $o "Usage: getref <key>\n";
    return
  }

  my $ser = Bot::Cobalt::Serializer->new('JSON');

  unless ( $db->dbopen(ro => 1) ) {
    print $o "Database open failure\n";
    return
  }
  
f;
  eval { $ref = $ser->thaw($item) };
  if ($@) {
    print $o "Could not thaw value; maybe not JSON?\n";
    return
  }
  
  unless (ref $ref) {
    print $o "Thawed value not a reference\n";
    r
CatalystX-OAuth2 ( E/ED/EDENC/CatalystX-OAuth2-0.001002.tar.gz, EDENC, 2012; MetaCPAN )
CatalystX-OAuth2/lib/Catalyst/Authentication/Credential/OAuth2.pm ( view source; MetaCPAN )
uth2;
use Moose;
use MooseX::Types::Common::String qw(NonEmptySimpleStr);
use LWP::UserAgent;
use JSON::Any;
use Moose::Util;

# ABSTRACT: Authenticate against OAuth2 servers


has [qw(grant_uri token
nfo->{state} if exists $auth_info->{state};
  $uri->query_form($query);
  return $uri;
}

my $j = JSON::Any->new;

sub request_access_token {
  my ( $self, $callback_uri, $code, $auth_info ) = @_;
  m
uery);
  my $response = $self->ua->get($uri);
  return unless $response->is_success;
  return $j->jsonToObj( $response->decoded_content );
}

1;

__END__
=pod

=head1 NAME

Catalyst::Authentication::C
CatalystX-OAuth2 ( E/ED/EDENC/CatalystX-OAuth2-0.001002.tar.gz, EDENC, 2012; MetaCPAN )
CatalystX-OAuth2/lib/CatalystX/OAuth2/ActionRole/Token.pm ( view source; MetaCPAN )
e::Token;
use Moose::Role;
use JSON::Any;

# ABSTRACT: A role for building token-building actions

with 'CatalystX::OAuth2::ActionRole::RequestInjector';

my $json = JSON::Any->new;

after execute => 
sub {
  my($self, $controller, $c) = @_;
  $c->res->body($json->objToJson($c->req->oauth2->query_parameters));
};

1;

__END__
=pod

=head1 NAME

CatalystX::OAuth2::ActionRole::Token - A role for buil
Catalyst-Plugin-Server-JSONRPC-Batch ( D/DI/DIONYS/Catalyst-Plugin-Server-JSONRPC-Batch-0.02.tar.gz, DIONYS, 2012; MetaCPAN )
Catalyst-Plugin-Server-JSONRPC-Batch/lib/Catalyst/Plugin/Server/JSONRPC/Batch.pm ( view source; MetaCPAN )
gin::Server::JSONRPC::Batch;

use strict;
use warnings;

use Class::Load ();
use HTTP::Body ();


our $VERSION = '0.02';

our $Method = 'system.handle_batch';


BEGIN {
	my $class = 'JSON::RPC::Common
q 'ARRAY') {
				return $class->new_from_data(
					jsonrpc => '2.0',
					id      => scalar(time()),
					method  => $Catalyst::Plugin::Server::JSONRPC::Batch::Method,
					params  => $args[0]
				);
up_engine {
	my $app = shift();

	$app->server->jsonrpc->add_private_method(
		$Method => sub {
			my ($c, @args) = @_;

			my $config = $c->server->jsonrpc->config;
			my $req    = $c->req;
			my $re
CPAN-Source ( C/CO/CORNELIUS/CPAN-Source-0.04.tar.gz, CORNELIUS, 2012; MetaCPAN )
CPAN-Source/lib/CPAN/Source/Dist.pm ( view source; MetaCPAN )
urity 
    filename 
    cpanid 
    extension 
    pathname
    source_path 
    _parent
));
use JSON::XS;
use YAML::XS;
use URI;
use overload '""' => \&to_string;

# CPAN::DistnameInfo compatible
su
cpanid,
        extension => $self->extension,
        pathname  => $self->pathname,
        source_path => $self->source_path,
    };
}

sub to_string { 
    return encode_json( $_[0]->data );
}

1;
Google-GeoCoder-Smart ( T/TT/TTG/GoogleGeoCoderSmart/Google-GeoCoder-Smart-1.16.tar.gz, TTG, 2012; MetaCPAN )
Google-GeoCoder-Smart/lib/Google/GeoCoder/Smart.pm ( view source; MetaCPAN )


package Google::GeoCoder::Smart;

require Exporter;

use LWP::Simple qw(!head);

use JSON;

our @ISA = qw(Exporter);

our @EXPORT = qw(geocode parse);

our $VERSION = 1.16;

=head1 NAME

Smart - Goo
ing. 

This module only depends on LWP::Simple and JSON. 

This version removes the depriciated homemade xml parsing and goes completely with the JSON format. 

If you need the old xml version, the ol
}{lng};

It is helpful to know the format of the json returns of the api. 

A good example can be found at http://www.google.com/maps/apis/geocode/json?address=1600+Amphitheatre+Parkway+Mountain+View,
Class-ReluctantORM ( C/CL/CLWOLFE/Class-ReluctantORM-0.52_0.tar.gz, CLWOLFE, 2012; MetaCPAN )
Class-ReluctantORM/lib/Class/ReluctantORM/Utilities.pm ( view source; MetaCPAN )
XPORT_TAGS = ();

use Class::ReluctantORM::Exception;
use Lingua::EN::Inflect;
use Sub::Name;
use JSON;

our $DEBUG = 0;


=head1 SUBROUTINES

=cut

=head2 install_method('Class', 'method_name', $code


=head2 $json_string = json_encode($perl_ref);

Version-blind JSON encoder.

=cut

push @EXPORT_OK, 'json_encode';
sub json_encode {
    if ($JSON::VERSION > 2) {
        goto &JSON::to_json;
    } e

        goto &JSON::objToJson;
    }
}

=head2 $perl_ref = json_decode($json_string);

Version-blind JSON decoder.

=cut

push @EXPORT_OK, 'json_decode';
sub json_decode {
    if ($JSON::VERSION > 2)
Class-ReluctantORM ( C/CL/CLWOLFE/Class-ReluctantORM-0.52_0.tar.gz, CLWOLFE, 2012; MetaCPAN )
Class-ReluctantORM/lib/Class/ReluctantORM/SchemaCache.pm ( view source; MetaCPAN )
se Carp;
use Class::ReluctantORM::Utilities qw(conditional_load_subdir read_file write_file json_encode json_decode);

our @POLICY_CLASSES;
BEGIN {
    @POLICY_CLASSES = conditional_load_subdir(__PACK
 = json_decode($raw);
}

sub write_cache_file {
    my $self = shift;
    my $filename = Class::ReluctantORM->get_global_option('schema_cache_file');
    return unless $filename;

    my $raw = json_e
WebService-Face ( A/AA/AASSAD/WebService-Face-0.04.tar.gz, AASSAD, 2012; MetaCPAN )
WebService-Face/lib/WebService/Face/Client.pm ( view source; MetaCPAN )
use warnings;
use Carp;

use WebService::Face::Response;
use WebService::Face::Response::Tag;
use JSON;
use REST::Client;

=head1 NAME

WebService::Face::Client - Client to the Face.com REST API

=hea
et_header(Authorization => "Basic $creds");
    #        $self->set_header(Accept => "application/json");

    return $self;
}

=head2 faces_detect ( \%params )

Returns tags for detected faces in one
 .= "&$key=" . $params->{$key};
    }

    return $self->_process_response( 'GET', "/faces/detect.json?" . $self->_get_credential_parameters() . $parameters );
}

=head2 faces_train ( \%params )

Call

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