NAME

JSON::RPC::Spec::Procedure - Subclass of JSON::RPC::Spec

SYNOPSIS

use strict;
use Router::Simple;
use JSON::RPC::Spec::Procedure;

my $router = Router::Simple->new;
$router->connect(
    echo => {
        '.callback' => sub { $_[0] }
    }
);
my $proc = JSON::RPC::Spec::Procedure->new(router => $router);
my $res = $proc->parse(
    {
        jsonrpc => '2.0',
        method  => 'echo',
        params  => 'Hello, World!',
        id      => 1
    }
); # return hash ->
   #    {
   #        jsonrpc => '2.0',
   #        result  => 'Hello, World!',
   #        id      => 1
   #    },

DESCRIPTION

JSON::RPC::Spec::Procedure is Subclass of JSON::RPC::Spec.

FUNCTIONS

new

constructor. `router` required.

parse

parse procedure.

router

similar Router::Simple.

LICENSE

Copyright (C) nqounet.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

nqounet <mail@nqou.net>