Group
Extension

Matches 35359

Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia/Context.pm ( view source; MetaCPAN )
scriptName//;

    my ($response_type, $resource_type, $resource_id) = ( $uri =~ m{/?(?:(html|xml|json|atom|rss)/)?([^?\\\/]*)(?:/([^?\\\/]+)?)?} );

    $self->response_type = lc($response_type) || '
Echo-StreamServer ( A/AD/ADROFFNER/Echo-StreamServer-0.07.tar.gz, ADROFFNER, 2012; MetaCPAN )
Echo-StreamServer/lib/Echo/StreamServer/Feeds.pm ( view source; MetaCPAN )
onds
	);

	my $json_hash_ref = send_request($self->{'account'}, 'feeds/register', \%params);

        # Return true on success.
        if (exists($json_hash_ref->{'result'}) and ($json_hash_ref->{'re
rl,
	);

	my $json_hash_ref = send_request($self->{'account'}, 'feeds/unregister', \%params);

        # Return true on success.
        if (exists($json_hash_ref->{'result'}) and ($json_hash_ref->{'r
Echo-StreamServer ( A/AD/ADROFFNER/Echo-StreamServer-0.07.tar.gz, ADROFFNER, 2012; MetaCPAN )
Echo-StreamServer/lib/Echo/StreamServer/Items.pm ( view source; MetaCPAN )
pkey'},
		'q' => $query,
	);

	my $json_hash_ref = send_request($self->{'account'}, 'count', \%params);
	if ($DEBUG) { print STDERR "count returned: " . Dumper($json_hash_ref) . "\n"; }

        # Ret
urn count or zero when impossible.
        if (exists($json_hash_ref->{'count'})) {
        	return $json_hash_ref->{'count'};
        }
        else {
                return 0;
        }
}

sub searc
arams{'since'} = $since;
	}

	my $json_hash_ref = send_request($self->{'account'}, 'search', \%params);

        # Return results data structure.
        return $json_hash_ref;
}

sub submit {
	my ($s
Message-Passing-Output-ElasticSearch ( D/DA/DAMS/Message-Passing-Output-ElasticSearch-0.003.tar.gz, DAMS, 2012; MetaCPAN )
Message-Passing-Output-ElasticSearch/lib/Message/Passing/Output/ElasticSearch.pm ( view source; MetaCPAN )
:Types::ISO8601 qw/ ISO8601DateTimeStr /;
use MooseX::Types::DateTime qw/ DateTime /;
use JSON qw/ encode_json /;
use namespace::autoclean;

our $VERSION = '0.003';
$VERSION = eval $VERSION;

with 'Me
|| 'none',
            '@message' => exists($data->{message}) ? delete($data->{message}) : encode_json($data),
            '@fields' => $data,
        },
        exists($data->{uuid}) ? ( id => delete
Echo-StreamServer ( A/AD/ADROFFNER/Echo-StreamServer-0.07.tar.gz, ADROFFNER, 2012; MetaCPAN )
Echo-StreamServer/lib/Echo/StreamServer/Users.pm ( view source; MetaCPAN )
=============================
# JSON.pm calls TO_JSON() method on the blessed hash.
#
# NOTE: The convert_blessed flag must be set (false by default).
#	my $json = JSON->new->convert_blessed;
# ======
================================================================
use JSON;
my $json = JSON->new->convert_blessed;

our @USER_SUBJECTS = ( 'roles', 'state', 'markers', 'poco' );

sub get {
	my ($self, 
$raise_not_found) = @_;

	my %params = (
		'identityURL' => $identity_url,
	);

	my $json_hash_ref;
	eval {
		$json_hash_ref = send_request($self->{'account'}, 'users/get', \%params);
	};
        # Re
Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia.pm ( view source; MetaCPAN )
View>

The base class, which creates a view of the application.
The result can be represented in  JSON, XML and HTML.
L<XML::LibXSLT> is used to generate HTML.

=item L<Ambrosia::Validator>

The class
Data-MessagePack ( G/GF/GFUJI/Data-MessagePack-0.42.tar.gz, GFUJI, 2012; MetaCPAN )
Data-MessagePack/benchmark/serialize.pl ( view source; MetaCPAN )
rnings;
use Data::MessagePack;
use JSON;
use Storable;
use Benchmark ':all';

my $a = do 'benchmark/data.pl';

print "-- serialize\n";
print "$JSON::Backend: ", $JSON::Backend->VERSION, "\n";
print "D
";
print "Storable: $Storable::VERSION\n";
cmpthese timethese(
    -1 => {
        json     => sub { JSON::encode_json($a) },
        storable => sub { Storable::freeze($a) },
        mp       => sub 
MARC-Record-Generic ( C/CF/CFOUTS/MARC-Record-Generic-0.001.tar.gz, CFOUTS, 2012; MetaCPAN )
MARC-Record-Generic/lib/MARC/Record/Generic.pm ( view source; MetaCPAN )
number of purposes, but the
principle intention is to make MARC data amenable to serializing into
JSON, YAML, etc. Field and subfield order is preserved. Multiple
instances of either are also allowed.
ed by Frederic Demians' MARC::Moose::Formater::JSON.

Format inspired by http://dilettantes.code4lib.org/blog/2010/09/a-proposal-to-serialize-marc-in-json

=head1 AUTHOR

Clay Fouts <cfouts@khephera.n
Net-OpenStack-Compute ( I/IR/IRONCAMEL/Net-OpenStack-Compute-1.1002.tar.gz, IRONCAMEL, 2012; MetaCPAN )
Net-OpenStack-Compute/lib/Net/OpenStack/Compute/Auth.pm ( view source; MetaCPAN )
Auth;
use Any::Moose;
with 'Net::OpenStack::Compute::AuthRole';

#use Data::Dumper;
use JSON qw(from_json to_json);
use LWP;

has _info => (is => 'ro', lazy => 1, builder => '_build_info');

has base_
  content_type => 'application/json', content => to_json($auth_data));
    die $res->status_line . "\n" . $res->content unless $res->is_success;
    my $data = from_json($res->content);
    my $token 
Ambrosia ( K/KN/KNM/Ambrosia-0.010.tar.gz, KNM, 2012; MetaCPAN )
Ambrosia/lib/Ambrosia/core/Nil.pm ( view source; MetaCPAN )
[], ref $proto || $proto;
    }
}

sub sub_nil
{
    my $obj = shift;
    sub { $obj };
}

sub TO_JSON
{
    return {};
}

sub AUTOLOAD
{
    unless ( defined wantarray ) # don't bother doing more
   
POE-Component-Server-JSONRPC ( M/MC/MCMIC/POE-Component-Server-JSONRPC-0.05-bis.tar.gz, MCMIC, 2012; MetaCPAN )
POE-Component-Server-JSONRPC/lib/POE/Component/Server/JSONRPC/Http.pm ( view source; MetaCPAN )
ackage POE::Component::Server::JSONRPC::Http;
use strict;
use warnings;
use POE::Component::Server::JSONRPC; # for old Perl 5.005
use base qw(POE::Component::Server::JSONRPC);

our $VERSION = '0.03';
::Server::SimpleHTTP
    Filter::Line
    /;
use JSON::Any;

use Data::Dumper;

=head1 NAME

POE::Component::Server::JSONRPC::Http - POE http based JSON-RPC server

=head2 new

constructor
=cut

sub n
 ($self, $kernel, $session, $heap) = @_[OBJECT, KERNEL, SESSION, HEAP];

    $kernel->alias_set( 'JSONRPCHTTP' );

    if (defined($self->{Authenticate})) {
        $kernel->state('http_input_handler'
POE-Component-Server-JSONRPC ( M/MC/MCMIC/POE-Component-Server-JSONRPC-0.05-bis.tar.gz, MCMIC, 2012; MetaCPAN )
POE-Component-Server-JSONRPC/lib/POE/Component/Server/JSONRPC/Tcp.pm ( view source; MetaCPAN )
:Server::JSONRPC::Tcp;
use strict;
use warnings;
use base qw(POE::Component::Server::JSONRPC);

our $VERSION = '0.01';

use POE qw/
    Component::Server::TCP
    Filter::Line
    /;
use JSON::Any;

=
head1 NAME

POE::Component::Server::JSONRPC::Tcp - POE tcp based JSON-RPC server

=head2 new

constructor
=cut

sub new {
    my $self = shift->SUPER::new( @_ > 1 ? {@_} : $_[0] );
    return $self;
}
Net-OpenStack-Compute ( I/IR/IRONCAMEL/Net-OpenStack-Compute-1.1002.tar.gz, IRONCAMEL, 2012; MetaCPAN )
Net-OpenStack-Compute/lib/Net/OpenStack/Compute.pm ( view source; MetaCPAN )
mpute;
use Moose;

our $VERSION = '1.1002'; # VERSION

use Carp;
use HTTP::Request;
use JSON qw(from_json to_json);
use LWP;

has auth_url     => (is => 'rw', required => 1);
has user         => (is =
params);
    my $res = $self->_get($self->_url("/servers", $params{detail}, $q));
    return from_json($res->content)->{servers};
}

sub get_server {
    my ($self, $id) = @_;
    croak "Invalid serve
elf->_get($self->_url("/servers/$id"));
    return undef unless $res->is_success;
    return from_json($res->content)->{server};
}

sub get_servers_by_name {
    my ($self, $name) = @_;
    my $server
Net-OpenStack-Compute ( I/IR/IRONCAMEL/Net-OpenStack-Compute-1.1002.tar.gz, IRONCAMEL, 2012; MetaCPAN )
Net-OpenStack-Compute/lib/Net/OpenStack/Compute/AuthRole.pm ( view source; MetaCPAN )
package Net::OpenStack::Compute::AuthRole;
use Moose::Role;

use JSON qw(from_json to_json);

requires qw(
    auth_url
    user
    password
    project_id
    region
    service_name
    is_rax_auth
  content_type => 'application/json', content => to_json($auth_data));
    die $res->status_line . "\n" . $res->content unless $res->is_success;
    my $data = from_json($res->content);
    my $token 
POE-Component-Server-JSONRPC ( M/MC/MCMIC/POE-Component-Server-JSONRPC-0.05-bis.tar.gz, MCMIC, 2012; MetaCPAN )
POE-Component-Server-JSONRPC/lib/POE/Component/Server/JSONRPC.pm ( view source; MetaCPAN )
Server::JSONRPC;
use strict;
use warnings;
use base qw/Class::Accessor::Fast/;

our $VERSION = '0.05';

use POE qw/
    Filter::Line
    /;
use JSON;

=head1 NAME

POE::Component::Server::JSONRPC - PO
E tcp or http based JSON-RPC server

=head1 SYNOPSIS

    #http version:
    POE::Component::Server::JSONRPC::Http->new(
        Port    => 3000,
        Handler => {
            'echo' => 'echo',
   
Server::JSONRPC::Tcp->new(
        Port    => 3000,
        Handler => {
            'echo' => 'echo',
            'sum'  => 'sum',
        },
    );

    sub echo {
        my ($kernel, $jsonrpc, $id
Neo4j ( N/NU/NUBA/Neo4j-0.01_01.tar.gz, NUBA, 2012; MetaCPAN )
Neo4j/lib/Neo4j/Role/REST.pm ( view source; MetaCPAN )
der  => '_build_endpoints',
);

sub _build_endpoints {
    my $self = shift;
    # TODO should decode the content
#    $self->_endpoints(decode_json($self->client->GET($self->_self_endpoint)));
}

1;
WWW-Socrata ( O/OV/OVENMAN/WWW-Socrata-0.02.tar.gz, OVENMAN, 2012; MetaCPAN )
WWW-Socrata/lib/WWW/Socrata.pm ( view source; MetaCPAN )
package WWW::Socrata;

use strict;
use warnings;
use WWW::Curl::Easy;
use JSON;
use URI::Escape;
use Carp;

our $VERSION = '0.02';

sub new {
	my $class = shift;
	my $rh_params = shift;
	my $self = {}
path;

	#define default headers to send
	my @headers = (
		'Accept: application/json',
		'Content-type: application/json',
		"X-App-Token: " . $self->{app_token},
	);

	#define parameters
	my $qstring
i++){
			shift @response;
		}
		$response_body = join("\n", @response);

		$obj_response = decode_json($response_body);
		return $obj_response;
	} else {
		croak "An error happened: " . $curl->strerro
Vimana ( C/CO/CORNELIUS/Vimana-2.26.tar.gz, CORNELIUS, 2012; MetaCPAN )
Vimana/lib/Vimana/Record.pm ( view source; MetaCPAN )
ings;
use strict;
use Vimana;
use Vimana::Util;
use JSON::PP;
use File::Path;
use Digest::MD5 qw(md5_hex);
use YAML;

sub new_json {
    return JSON::PP->new->allow_singlequote(1);
}

sub record_dir {
   open FH , "<" , $record_file;
    local $/;
    my $json = <FH>;
    close FH;

    my $record;
    eval { $record = new_json()->decode( $json ) };
    if( $@ ) {
        # try to load YAML. (old r
 $pkgname );
    return 0 if -f $record_file;

    open FH , ">" , $record_file;
    print FH new_json()->encode( $record );
    close FH;
    
    #return YAML::DumpFile( $record_file , $record  );
}
CPANPLUS-Dist-Gentoo ( V/VP/VPIT/CPANPLUS-Dist-Gentoo-0.12.tar.gz, VPIT, 2012; MetaCPAN )
CPANPLUS-Dist-Gentoo/lib/CPANPLUS/Dist/Gentoo.pm ( view source; MetaCPAN )
erl},
 ));

 return $OK->();
}

=head2 C<meta>

Returns the contents of the F<META.yml> or F<META.json> files as parsed by L<Parse::CPAN::Meta>.

=cut

sub meta {
 my $self = shift;
 my $mod  = $self-
return $meta if defined $meta;

 my $extract_dir = $mod->status->extract;

 for my $name (qw<META.json META.yml>) {
  my $meta_file = File::Spec->catdir($extract_dir, $name);
  next unless -e $meta_fi
Log-Message-Structured ( D/DA/DAMS/Log-Message-Structured-0.011.tar.gz, DAMS, 2012; MetaCPAN )
Log-Message-Structured/lib/Log/Message/Structured.pm ( view source; MetaCPAN )
     Log::Message::Structured::Component::Hostname
        Log::Message::Structured::Stringify::AsJSON
    /;

    has foo => ( is => 'ro', required => 1 );

    ... elsewhere ...

    use aliased 'My
either pass around in your application, log in a traditional
manor as a log line, or serialize to JSON or YAML for transmission over the
network.

=head1 COMPONENTS

The consuming class can include co
m L<Log::Message::Structured::Stringify::Sprintf>

=item L<Log::Message::Structured::Stringify::AsJSON>

=item L<Log::Message::Structured::Stringify::AsYAML>

=back

=head1 AUTHOR AND COPYRIGHT

Tomas

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