PHPackages                             foglcz/jsonrpc2 - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. foglcz/jsonrpc2

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

foglcz/jsonrpc2
===============

jsonrpc2 implementation for generic use. Test suite for Nette Framework included.

v1.2.1(6y ago)1962.1k↓40.4%10[2 issues](https://github.com/foglcz/JSONRpc2/issues)New BSDPHPPHP &gt;=5.3.2

Since Jul 27Pushed 4mo ago3 watchersCompare

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

READMEChangelog (1)DependenciesVersions (5)Used By (0)

PHP JSON-RPC client and server library
======================================

[](#php-json-rpc-client-and-server-library)

This library contains a PHP implementation of JSON-RPC version 2. This libraray implements both a client and a server.

⛔‼️ Deprecation notice ‼️⛔
--------------------------

[](#️-deprecation-notice-️)

As of January 2026 this repository is in archive mode. Furher development of this library will take place [here](https://github.com/scottchiefbaker/php-JSON-RPC).

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

[](#installation)

Download the contents of the `lib` folder to your project. Then simply include the appropriate library:

```
include "lib/Server.php";
include "lib/Client.php";
```

### Server example

[](#server-example)

```
$server = new Lightbulb\Json\Rpc2\Server;

// Add functions to the server object to make them callable remotely

// Built in PHP functions or user functions
$server->upper = 'strtoupper';
$server->getID = 'findUserID';

// Class based: All public methods in MyClass are exposed as user.method
$server->user = new MyClass;

// Receive and process any incoming RPC calls
$server->handle();
```

### Client example

[](#client-example)

```
$url    = 'http://api.domain.com/endpoint';
$client = new Lightbulb\Json\Rpc2\Client($url);

$str = $client->upper("kitten");
$id  = $client->getID("Jason Doolis");
```

#### Client supports class chaining to call nested methods

[](#client-supports-class-chaining-to-call-nested-methods)

```
$ok = $client->user->mail->login($user, $pass); // Maps to 'user.mail.login'
```

License
-------

[](#license)

Licensed under the New BSD License. Copyright 2011 Pavel Ptacek. All rights reserved.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance49

Moderate activity, may be stable

Popularity40

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 64.6% 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 ~941 days

Total

4

Last Release

2218d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/767839?v=4)[Pavel Ptacek](/maintainers/foglcz)[@foglcz](https://github.com/foglcz)

---

Top Contributors

[![scottchiefbaker](https://avatars.githubusercontent.com/u/3429760?v=4)](https://github.com/scottchiefbaker "scottchiefbaker (31 commits)")[![foglcz](https://avatars.githubusercontent.com/u/767839?v=4)](https://github.com/foglcz "foglcz (11 commits)")[![zabous](https://avatars.githubusercontent.com/u/8329461?v=4)](https://github.com/zabous "zabous (3 commits)")[![theo1024](https://avatars.githubusercontent.com/u/15445792?v=4)](https://github.com/theo1024 "theo1024 (2 commits)")[![b7kich](https://avatars.githubusercontent.com/u/572097?v=4)](https://github.com/b7kich "b7kich (1 commits)")

---

Tags

jsonnetterpc

### Embed Badge

![Health badge](/badges/foglcz-jsonrpc2/health.svg)

```
[![Health](https://phpackages.com/badges/foglcz-jsonrpc2/health.svg)](https://phpackages.com/packages/foglcz-jsonrpc2)
```

###  Alternatives

[datto/json-rpc

Fully unit-tested JSON-RPC 2.0 for PHP

1951.3M14](/packages/datto-json-rpc)[weberhofer/jsonrpcphp

JSON-RPC for PHP 5.3+

22281.4k2](/packages/weberhofer-jsonrpcphp)[wa72/jsonrpc-bundle

JSON-RPC server for Symfony: exposes services registered in the service container as JSON-RPC webservices

3164.1k](/packages/wa72-jsonrpc-bundle)[cranetm/yii2-json-rpc-2.0

JSON RPC 2.0 for Yii2 strict type validation of request and response data

2679.6k1](/packages/cranetm-yii2-json-rpc-20)[nizsheanez/yii2-json-rpc

A lightweight JsonRpc Server and Client for PHP

2034.0k](/packages/nizsheanez-yii2-json-rpc)[tinywan/rpc

simple rpc service for webman plugin

193.5k](/packages/tinywan-rpc)

PHPackages © 2026

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