PHPackages                             khs1994/advanced-json-rpc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. khs1994/advanced-json-rpc

ActiveLibrary

khs1994/advanced-json-rpc
=========================

A more advanced JSONRPC implementation

v3.1.4(5y ago)194↓100%ISCPHPPHP &gt;=7.0

Since Aug 24Pushed 5y agoCompare

[ Source](https://github.com/khs1994-php/php-advanced-json-rpc)[ Packagist](https://packagist.org/packages/khs1994/advanced-json-rpc)[ RSS](/packages/khs1994-advanced-json-rpc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (36)Used By (0)

Advanced JSONRPC
================

[](#advanced-jsonrpc)

[![Version](https://camo.githubusercontent.com/09c4802a812eb133b186a266f5a6a4d1a772bd277cee9c6074ff8ad448f0ac05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66656c6978666265636b65722f616476616e6365642d6a736f6e2d7270632e737667)](https://packagist.org/packages/felixfbecker/advanced-json-rpc)[![Build Status](https://camo.githubusercontent.com/1914efdb5d304c07a069829943cb378b2e4d2fa529dd1bfaa58dda531a931a5b/68747470733a2f2f7472617669732d63692e6f72672f66656c6978666265636b65722f7068702d616476616e6365642d6a736f6e2d7270632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/felixfbecker/php-advanced-json-rpc)[![Coverage](https://camo.githubusercontent.com/5edb544acbcd4ee4aac5d27d6a8046e765b0436340f6ba323c7164e80b20f1c7/68747470733a2f2f636f6465636f762e696f2f67682f66656c6978666265636b65722f7068702d616476616e6365642d6a736f6e2d7270632f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/felixfbecker/php-advanced-json-rpc)[![semantic-release](https://camo.githubusercontent.com/5f3b57745af83409bc673dec57e3eb360e1ec53b37ac29f81a319e347fa351c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2532302532302546302539462539332541362546302539462539412538302d73656d616e7469632d2d72656c656173652d6531303037392e737667)](https://github.com/semantic-release/semantic-release)[![License](https://camo.githubusercontent.com/07699cf0efb056a47b5c290b0ba83237a2311b261a28e920b44951a1ec6d5829/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f66656c6978666265636b65722f616476616e6365642d6a736f6e2d7270632e737667)](https://github.com/felixfbecker/php-advanced-json-rpc/blob/master/LICENSE)

Provides basic classes for requests and responses in JSONRPC and a `Dispatcher` class that can decode a JSONRPC request and call appropriate methods on a target, coercing types of parameters by type-hints and `@param` tags.

Supports nested targets: If the method is something like `myNestedTarget->theMethod`, the dispatcher will look for a `myNestedTarget` property on the target and call `theMethod` on it. The delimiter is configurable and defaults to the PHP object operator `->`.

Example
-------

[](#example)

```
use AdvancedJsonRpc\Dispatcher;

class Argument
{
    public $aProperty;
}

class Target
{
    public function someMethod(Argument $arg)
    {
        // $arg instanceof Argument === true
        // $arg->aProperty === 123
        return 'Hello World';
    }
}

$dispatcher = new Dispatcher(new Target());

$result = $dispatcher->dispatch('
    {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "someMethod",
        "params": {
            "arg": {"aProperty": 123}
        }
    }
');

// $result === "Hello World"
```

### Nested Targets

[](#nested-targets)

```
use AdvancedJsonRpc\Dispatcher;

class TextDocumentManager
{
    public function didOpen(string $uri)
    {
        return 'Thank you for this information';
    }
}

class LanguageServer
{
    public $textDocument;

    public function __construct()
    {
        $this->textDocument = new TextDocumentManager();
    }
}

$dispatcher = new Dispatcher(new LanguageServer(), '/');

$result = $dispatcher->dispatch('
    {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "textDocument/didOpen",
        "params": {
            "uri": "file:///c/Users/felix/test.php"
        }
    }
');

// $result === "Thank you for this information"
```

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 75.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~63 days

Recently: every ~93 days

Total

27

Last Release

1907d ago

Major Versions

v1.2.10 → v2.0.02016-10-20

v2.0.3 → v3.0.02017-10-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/69941311121544acc11e09be153f827d1c02ba629fba7b09bea32a96b92d8274?d=identicon)[khs1994](/maintainers/khs1994)

---

Top Contributors

[![felixfbecker](https://avatars.githubusercontent.com/u/10532611?v=4)](https://github.com/felixfbecker "felixfbecker (41 commits)")[![khs1994](https://avatars.githubusercontent.com/u/16733187?v=4)](https://github.com/khs1994 "khs1994 (4 commits)")[![TysonAndre](https://avatars.githubusercontent.com/u/1904430?v=4)](https://github.com/TysonAndre "TysonAndre (3 commits)")[![Lctrs](https://avatars.githubusercontent.com/u/5477973?v=4)](https://github.com/Lctrs "Lctrs (1 commits)")[![muglug](https://avatars.githubusercontent.com/u/2292638?v=4)](https://github.com/muglug "muglug (1 commits)")[![a-menshchikov](https://avatars.githubusercontent.com/u/2580489?v=4)](https://github.com/a-menshchikov "a-menshchikov (1 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (1 commits)")[![gnoe](https://avatars.githubusercontent.com/u/15986235?v=4)](https://github.com/gnoe "gnoe (1 commits)")[![JJK96](https://avatars.githubusercontent.com/u/11193274?v=4)](https://github.com/JJK96 "JJK96 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/khs1994-advanced-json-rpc/health.svg)

```
[![Health](https://phpackages.com/badges/khs1994-advanced-json-rpc/health.svg)](https://phpackages.com/packages/khs1994-advanced-json-rpc)
```

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M232](/packages/nelmio-api-doc-bundle)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[symfony/serializer-pack

A pack for the Symfony serializer

1.1k28.2M220](/packages/symfony-serializer-pack)[felixfbecker/advanced-json-rpc

A more advanced JSONRPC implementation

25578.7M6](/packages/felixfbecker-advanced-json-rpc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
