---
name: "JSON::RPC::Dispatch"
section: "3pm"
platform: "linux"
package: "libjson-rpc-perl"
version: "1.06-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/JSON::RPC::Dispatch"
---

# JSON::RPC::Dispatch(3pm)

Dispatch JSON RPC Requests To Handlers

## NAME

JSON::RPC::Dispatch - Dispatch JSON RPC Requests To Handlers

## SYNOPSIS

```
    use JSON::RPC::Dispatch;
    my $router = Router::Simple->new; # or use Router::Simple::Declare
    $router->connect( method_name => {
        handler => $class_name_or_instance,
        action  => $method_name_to_invoke
    );
    my $dispatch = JSON::RPC::Dispatch->new(
        router => $router
    );
    sub psgi_app {
        $dispatch->handle_psgi( $env );
    }
```

## DESCRIPTION

See docs in JSON::RPC for details
