Group
Extension

Matches 35359

JSORB ( S/ST/STEVAN/JSORB-0.04.tar.gz, STEVAN, 2010; MetaCPAN )
JSORB/lib/JSORB/Types.pm ( view source; MetaCPAN )
'
    => where {
        # these are the types of things that cannot be
        # serialized into JSON so will be neither arguments
        # or return values in our RPC environment.
        ($_->is_a
xpRef, GlobRef and Object. This is
primarily because these types are not easily serialziable with
JSON. Below is the type tree that JSORB supports and is
recommended.

  Unit
  Any
    Item
        Bo
JSORB ( S/ST/STEVAN/JSORB-0.04.tar.gz, STEVAN, 2010; MetaCPAN )
JSORB/lib/Catalyst/Action/JSORB/WithInvocant.pm ( view source; MetaCPAN )
ithInvocant;
use Moose;

our $VERSION   = '0.04';
our $AUTHORITY = 'cpan:STEVAN';

use JSORB;
use JSON::RPC::Common::Marshal::HTTP;

extends 'Catalyst::Action';

sub execute {
    my $self = shift;
  
her - $dispatcher (must inherit JSORB::Dispatcher::Catalyst::WithInvocant)";

    my $marshaler = JSON::RPC::Common::Marshal::HTTP->new;
    my $call      = $marshaler->request_to_call($c->request);
 
WebService-TypePad ( M/MA/MART/WebService-TypePad-0.01_01.tar.gz, MART, 2009; MetaCPAN )
WebService-TypePad/lib/WebService/TypePad/Request.pm ( view source; MetaCPAN )
;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Multi;
use WebService::TypePad::Util::JSON;
use Net::OAuth;

BEGIN {
    eval {  require Math::Random::MT };
    unless ($@) {
        Math:
up or the user.

    my $url = $self->{api}->backend_url() . join('/', @{$task->path_chunks}) . '.json';
    my $method = $task->method;

    my $req = HTTP::Request->new($method => $url);

    if (my
my $json_body = json_encode($body);
            $req->header('Content-Type' => 'application/json');
            $req->header('Content-Length' => length($json_body));
            $req->content($json_bo
WebService-TypePad ( M/MA/MART/WebService-TypePad-0.01_01.tar.gz, MART, 2009; MetaCPAN )
WebService-TypePad/lib/WebService/TypePad/Util/Coerce.pm ( view source; MetaCPAN )
kage WebService::TypePad::Util::Coerce;

use strict;
use warnings;
use WebService::TypePad::Util::JSON;
use WebService::TypePad::Object;
use Set::Tiny;

# Primitive Types

sub coerce_string_in {
    r
lean_in {
    return defined($_[0]) ? ($_[0] ? json_true() : json_false()) : undef;
}

sub coerce_boolean_out {
    return defined($_[0]) ? ($_[0] == json_true() ? 1 : 0) : undef;
}

# Collection type
sub {
        my ($obj) = @_;
        return undef unless defined($obj);
        return $obj->_as_json_dictionary;
    };

    foreach my $type (keys %WebService::TypePad::Object::Object_Types) {
    
Acme-URL ( D/DR/DRAEGTUN/Acme-URL-0.01.tar.gz, DRAEGTUN, 2009; MetaCPAN )
Acme-URL/lib/Acme/URL.pm ( view source; MetaCPAN )
:Perl;
    use JSON qw(decode_json);
    use Acme::URL;

    # print the json
    say http://twitter.com/statuses/show/6592721580.json;

    # => "He nose the truth."
    say decode_json( http://twitt
er.com/statuses/show/6592721580.json )->{text};


=head1 DESCRIPTION

See L<http://transfixedbutnotdead.com/2009/12/16/url-develdeclare-and-no-strings-attached/>

NB. This module is just a play thing 
JavaScript-Ectype ( H/HD/HDAICHI/JavaScript-Ectype-0.01.tar.gz, HDAICHI, 2009; MetaCPAN )
JavaScript-Ectype/lib/JavaScript/Ectype.pm ( view source; MetaCPAN )
package JavaScript::Ectype;
use strict;
use warnings;
our $VERSION = q{0.01};

use JSON;
use File::Slurp;
use File::Spec;
use UNIVERSAL::require;
use Carp qw/croak carp/;
use Scalar::Util qw/blessed/;
])/$1_$2/g;
    File::Spec->catfile( split /\./, lc($fqn));
}

sub _convert_json{
    my ($perl_value ) = @_;
    return JSON->new->utf8->encode( $perl_value );
}

sub _create_child {
    my ( $self, 
              sprintf(
                FORMAT_IMPORT_HEADER,
                $namespace, _convert_json( \@real ),
                join ',', @alias
              );
            unshift @footer, sprintf
WebService-TypePad ( M/MA/MART/WebService-TypePad-0.01_01.tar.gz, MART, 2009; MetaCPAN )
WebService-TypePad/lib/WebService/TypePad/Object.pm ( view source; MetaCPAN )
$self->{data} = {};
    map { $self->$_($params{$_}) } keys %params;
    return $self;}
sub _from_json_dictionary {
    my ($class, $dict) = @_;
    if (my $object_types = $dict->{objectTypes}) {
    
      }
    }
    my $self = $class->new();
    $self->{data} = $dict;
    return $self;}
sub _as_json_dictionary {
    return $_[0]->{data};
}
1;

=head1 NAME

WebService::TypePad::Object - Base clas
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/lib/POE/Component/Server/Bayeux.pm ( view source; MetaCPAN )
raft1) from the Dojo Foundation.
Also called cometd, Bayeux is a low-latency routing protocol for JSON encoded
events between clients and servers in a publish-subscribe model.

This is the server impl
 JSON::XS;
            my $json = JSON::XS->new();
            $json->indent(1);
            $json->ascii(1);
            $json->space_after(1);
            $self{dumper} = sub {
                $json
      $response->code(RC_SERVICE_UNAVAILABLE);
        $response->header( 'Content-Type' => "text/json; charset=utf-8" );
        $response->content( '{ "error": "Too many connections from your IP", "
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/lib/POE/Component/Server/Bayeux/Message/Service.pm ( view source; MetaCPAN )

        }
    }

    if ($self->is_error) {
        push @responses, {
            successful => JSON::XS::false,
            error => $self->is_error,
        };
    }

    foreach my $response (@re
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/lib/POE/Component/Server/Bayeux/Message/Meta.pm ( view source; MetaCPAN )
:Server::Bayeux::Message> to implement the /meta/* channels.

=cut

use strict;
use warnings;
use JSON::Any qw(XS);
use Switch;
use Params::Validate qw(:types);
use base qw(POE::Component::Server::Bay
      if ($self->is_error) {
                push @responses, {
                    successful => JSON::XS::false,
                    error => $self->is_error,
                };
                last
portedConnectionTypes => $supported_connection_types,
                successful               => JSON::XS::true,
                clientId                 => $client->id,
                advice       
Geo-Coder-GoogleMaps ( D/DU/DUPUISARN/Geo-Coder-GoogleMaps-0.4.tar.gz, DUPUISARN, 2009; MetaCPAN )
Geo-Coder-GoogleMaps/lib/Geo/Coder/GoogleMaps/Location.pm ( view source; MetaCPAN )
package Geo::Coder::GoogleMaps::Location ;

use strict;
use warnings;
use strict;
use Carp;
use JSON::Syck;
use XML::LibXML;

our $VERSION='0.4';

=encoding utf-8

=head1 NAME

Geo::Coder::GoogleMaps:
e'} || '',
				delete $param{'altitude'} || 0
			]
		}
	};
	my $out = delete $param{'output'} || 'json';
	bless { data => $obj, output => $out }, $class;
}

=head2 SubAdministrativeAreaName

Access th
>{'west'} ;
}

=head2 toJSON

Return a JSON encoded object ( thanks to JSON::Syck::Dump() )

	my $json = $location->toJSON ;

=cut

sub toJSON {
	my $self = shift;
	return JSON::Syck::Dump($self->{'da
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/lib/POE/Component/Server/Bayeux/Message/Publish.pm ( view source; MetaCPAN )
lish(), with a response given back to the requesting client.

=cut

use strict;
use warnings;
use JSON::Any qw(XS);
use base qw(POE::Component::Server::Bayeux::Message);

__PACKAGE__->mk_data_accessor
->add_response({
        successful => JSON::XS::true,
    });
}

sub handle_error {
    my ($self, $error) = @_;

    my %response = (
        successful => JSON::XS::false,
        error => $error |
Geo-Coder-GoogleMaps ( D/DU/DUPUISARN/Geo-Coder-GoogleMaps-0.4.tar.gz, DUPUISARN, 2009; MetaCPAN )
Geo-Coder-GoogleMaps/lib/Geo/Coder/GoogleMaps.pm ( view source; MetaCPAN )
package Geo::Coder::GoogleMaps;

use warnings;
use strict;
use Carp;
use Encode;
use JSON::Syck;
use HTTP::Request;
use LWP::UserAgent;
use URI;
use XML::LibXML ;
use Geo::Coder::GoogleMaps::Location;
miyagawa/>).

In fact it's a fork of Mr Miyagawa's module. Geo::Coder::GoogleMaps use the default JSON data type as default output but also support XML/KML.

The direct output of the geocode() method 
 is: maps.google.com)
	output : the output method between xml, kml and json (csv support plan for futur release). Default is json.

Example:

	my $gmap = Geo::Coder::GoogleMaps->new( apikey => 'abcdef
DBIx-Replicate ( K/KA/KAZUHO/DBIx-Replicate-0.04.tar.gz, KAZUHO, 2009; MetaCPAN )
DBIx-Replicate/DBIx-Replicate-0.04/inc/Module/Install/WriteAll.pm ( view source; MetaCPAN )
 Experimental support for MYMETA
	if ( $ENV{X_MYMETA} ) {
		if ( $ENV{X_MYMETA} eq 'JSON' ) {
			$self->Meta->write_mymeta_json;
		} else {
			$self->Meta->write_mymeta_yaml;
		}
	}

	return 1;
}

1;
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/lib/POE/Component/Client/Bayeux/Transport/LongPolling.pm ( view source; MetaCPAN )
POE;
use Data::Dumper;
use HTTP::Request;
use POE::Component::Client::Bayeux::Utilities qw(decode_json_response);

use base qw(POE::Component::Client::Bayeux::Transport);

sub extra_states {
    # ret
uest, encoding the messages into JSON
    my $request = HTTP::Request->new('POST', $pheap->{remote_url},
        [ 'content-type', 'text/json' ],
        $pheap->{json}->encode(\@messages),
    );

  
et->[0];

    my $meta = delete $heap->{_tunnelsOpen}{$request_tag};

    my $json;
    eval {
        $json = decode_json_response($response_object);
    };
    if ($@) {
        # Ignore errors if s
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/lib/POE/Component/Client/Bayeux.pm ( view source; MetaCPAN )
         user => "POE",
                    chat => "POE has joined",
                    join => JSON::XS::true,
                });
            },
            events => sub {
                my ($ke
raft1) from the Dojo Foundation.
Also called cometd, Bayeux is a low-latency routing protocol for JSON encoded
events between clients and servers in a publish-subscribe model.

This is the client impl
::Client::HTTP Component::Client::Bayeux::Transport);
use Params::Validate;
use Data::Dumper;
use JSON::Any;
use Data::UUID;
use HTTP::Request::Common;
use Log::Log4perl qw(get_logger :levels);
use Lo
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/testbin/cli_client.pl ( view source; MetaCPAN )
#!/usr/bin/perl

use strict;
use warnings;
use Getopt::Long;
use FindBin;
use Data::Dumper;
use JSON::XS;
use lib "$FindBin::Bin/../lib";
use POE qw(
    Component::Client::Bayeux
    Component::Debug
        my $message;
        eval { $message = decode_json(join ' ', @message) };
        if ($@) {
            print STDERR "Failed to decode JSON data from input\n$@";
            return;
        }
      $message->{error} ? $message->{error} : '(no error)',
            $message->{data} ? encode_json($message->{data}) : '';
        return;
    }

    my $output = '';
    if (my $data = $message->
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/lib/POE/Component/Server/Bayeux/Request.pm ( view source; MetaCPAN )
uest and HTTP::Response object.  This class is responsible for parsing the request content into a JSON object, creating one or more L<POE::Component::Server::Bayeux::Message> objects that represent th

use HTTP::Status; # for RC_OK
use HTTP::Request::Common;
use CGI::Simple::Util qw(unescape);
use JSON::Any qw(XS);
use Data::UUID;
use Params::Validate;

use POE qw(Component::Server::Bayeux::Message
quest
    http_response
    json_response
    messages
    responses
    heap
    delay
    post_handle
    json_comment_filtered
));

## Class Globals ###

my $json = JSON::Any->new();
my $uuid = Dat
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/testbin/client.pl ( view source; MetaCPAN )
#!/usr/bin/perl

use strict;
use warnings;
use FindBin;
use Data::Dumper;
use JSON::Any qw(XS);
use lib "$FindBin::Bin/../lib";

use POE qw(Component::Client::Bayeux);

POE::Component::Client::Bayeux-

                user => "POE",
                chat => "POE has joined",
                join => JSON::XS::true,
            });
            $kernel->delay('publish', 5);
        },
        publish =
POE-Component-Server-Bayeux ( E/EW/EWATERS/POE-Component-Server-Bayeux-0.04.tar.gz, EWATERS, 2009; MetaCPAN )
POE-Component-Server-Bayeux/lib/POE/Component/Client/Bayeux/Utilities.pm ( view source; MetaCPAN )
ies;

use strict;
use warnings;
use JSON::Any;
use base qw(Exporter);

our @EXPORT_OK = qw(decode_json_response);

my $json_any = JSON::Any->new();

sub decode_json_response {
    my ($response) = @_;
onse->content_type eq 'text/json-comment-filtered') {
        $content =~ s{^\s* /\* \s* (.+?) \s* \*/ \s*$}{$1}x;
    }

    my $object;
    eval {
        $object = $json_any->decode($content);
    
};
    if ($@) {
        die "Failed to JSON decode data (error $@).  Content:\n" . $content;
    }

    return $object;
}

1;

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