PHPackages                             alanbem/josser - 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. alanbem/josser

ActiveLibrary[API Development](/categories/api)

alanbem/josser
==============

JSON-RPC client for PHP

v0.5.0(5y ago)775.5k↓31.3%4MITPHPPHP &gt;=7.1.0CI passing

Since Apr 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/alanbem/Josser)[ Packagist](https://packagist.org/packages/alanbem/josser)[ Docs](http://github.com/alanbem/josser)[ RSS](/packages/alanbem-josser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Josser - JSON-RPC client for PHP 5.3+
=====================================

[](#josser---json-rpc-client-for-php-53)

[![Build Status](https://camo.githubusercontent.com/bd91991550a61f4860b12f12366a00b748a4ff3ff1f10fdced6d4b56e6ff99a5/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f616c616e62656d2f4a6f737365722e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/alanbem/Josser)

JSON-RPC? What is it?
---------------------

[](#json-rpc-what-is-it)

JSON-RPC is a stateless, light-weight remote procedure call protocol encoded in JSON. It is a very simple protocol, defining only a handful of data types and commands.

Which specification of JSON-RPC does Josser support?
----------------------------------------------------

[](#which-specification-of-json-rpc-does-josser-support)

Josser supports \[JSON-RPC 1.0\] () and \[revised JSON-RPC 2.0\] (). Unfortunately only client-server connections are possible with Josser - albeit JSON-RPC 1.0 was designed as P2P - due to PHP limitations.

It is worth to mention that Josser's architecture allows to plug your own JSON-RPC flavours or implement existing semi-standardized JSON-RPC protocols e.g. abandoned JSON-RPC 1.1WD.

Transport mechanism
-------------------

[](#transport-mechanism)

As specification (both 1.0 and 2.0) states, JSON-RPC is transport agnostic. Josser sticks to that and allows to use http, sockets, tcp/ip or anything else your project requires (like post-it notes on a fridge :D). Currently only http transport is implemented.

Documentation
=============

[](#documentation)

Usage
-----

[](#usage)

Invoking remote methods is fairly simple:

```
