Group
Extension

Matches 7

JSORB ( S/ST/STEVAN/JSORB-0.04.tar.gz, STEVAN, 2010; MetaCPAN )
JSORB/lib/JSORB.pm ( view source; MetaCPAN )


  http://localhost:8080/?method=/math/simple/add&params=[2,2]

  # and get back a response
  { "jsonrpc" : "2.0", "result" : 2 }

  ## compile your own Javascript client
  ## library for use in a we
 goal of this module is to provide a cleaner and more formalized
way to do AJAX programming using JSON-RPC in the flavor of Object
Request Brokers.

=head2 FUTURE PLANS

Currently this is more focused
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);
 
JSORB ( S/ST/STEVAN/JSORB-0.04.tar.gz, STEVAN, 2010; MetaCPAN )
JSORB/lib/JSORB/Dispatcher/Path.pm ( view source; MetaCPAN )
$self, $call, @args) = @_;
    (blessed $call && $call->isa('JSON::RPC::Common::Procedure::Call'))
        || confess "You must pass a JSON::RPC::Common::Procedure::Call to the handler, not $call";

 
JSORB ( S/ST/STEVAN/JSORB-0.04.tar.gz, STEVAN, 2010; MetaCPAN )
JSORB/lib/JSORB/Server/Simple.pm ( view source; MetaCPAN )

use Moose;

use HTTP::Server::Simple;
use HTTP::Request;
use HTTP::Response;

use Try::Tiny;
use JSON::RPC::Common::Marshal::HTTP;

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

with 'Moo
has 'request_marshaler' => (
    is      => 'ro',
    isa     => 'JSON::RPC::Common::Marshal::HTTP',
    default => sub {
        JSON::RPC::Common::Marshal::HTTP->new
    },
);

has 'handler' => (
  
lt_to_response($result);
        } catch {
            # NOTE:
            # should this return a JSONRPC error?
            # or is the standard HTTP Error okay?
            # - SL
            HTTP::
JSORB ( S/ST/STEVAN/JSORB-0.04.tar.gz, STEVAN, 2010; MetaCPAN )
JSORB/lib/Catalyst/Action/JSORB.pm ( view source; MetaCPAN )
tion::JSORB;
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;
  
s "Bad dispatcher - $dispatcher (must inherit JSORB::Dispatcher::Catalyst)";

    my $marshaler = JSON::RPC::Common::Marshal::HTTP->new;
    my $call      = $marshaler->request_to_call($c->request);
 
JSORB ( S/ST/STEVAN/JSORB-0.04.tar.gz, STEVAN, 2010; MetaCPAN )
JSORB/lib/JSORB/Server/Traits/WithDebug.pm ( view source; MetaCPAN )
package JSORB::Server::Traits::WithDebug;
use Moose::Role;

use Text::SimpleTable;
use JSON ();

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

around 'build_handler' => sub {
    my $next 
ext::SimpleTable->new(15, 55);
        $t3->row(
            'Response' => JSON->new->pretty(1)->encode(
                JSON->new->decode(
                    $response->content
                )
   
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

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