PHPackages                             vaderangry/php-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. [API Development](/categories/api)
4. /
5. vaderangry/php-json-rpc

ActiveLibrary[API Development](/categories/api)

vaderangry/php-json-rpc
=======================

Flexible JSON-RPC2 server/client implementation for PHP7

v1.2.1(8y ago)117.9k↓100%12MITPHPPHP ^7.0

Since Dec 10Pushed 8y ago3 watchersCompare

[ Source](https://github.com/vaderangry/PhpJsonRpc)[ Packagist](https://packagist.org/packages/vaderangry/php-json-rpc)[ Docs](https://github.com/vaderangry/PhpJsonRpc)[ RSS](/packages/vaderangry-php-json-rpc/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)DependenciesVersions (11)Used By (2)

PhpJsonRpc
==========

[](#phpjsonrpc)

Flexible [JSON-RPC2](http://www.jsonrpc.org/specification) server/client implementation for PHP7.

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a5c23b06cb5a1d12b7be8cb881fdbc750b243c8d41749d03cf862b272f5eb2d3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7661646572616e6772792f5068704a736f6e5270632f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/vaderangry/PhpJsonRpc/?branch=master)[![Build Status](https://camo.githubusercontent.com/aba776e7f4ec12dc6d1e49d187fda8d67e34d1d30386a0400cbdbffb3bbfa843/68747470733a2f2f7472617669732d63692e6f72672f7661646572616e6772792f5068704a736f6e5270632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vaderangry/PhpJsonRpc)

Features
--------

[](#features)

- JSON-RPC 2.0 full conformance (batch requests, notification, positional and named arguments, etc)​.
- Quick-start with default routing based on php namespaces.
- Flexible custom routing for your requirements.
- The mechanism of intercepting requests and responses through handlers.
- Automatic casting types in requests and responses.
- Fully unit tested.

Installation
------------

[](#installation)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require vaderangry/php-json-rpc
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.

Documentation
-------------

[](#documentation)

- [Server usage](doc/01-server-usage.md)
- [Client usage](doc/02-client-usage.md)

Basic usage
-----------

[](#basic-usage)

### Server

[](#server)

The example of quick-start:

```
