PHPackages                             moaction/jsonrpc-server - 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. moaction/jsonrpc-server

ActiveLibrary[API Development](/categories/api)

moaction/jsonrpc-server
=======================

Jsonrpc server php implementation

v1.1(12y ago)018511MITPHPPHP &gt;=5.3.0

Since Dec 18Pushed 12y ago1 watchersCompare

[ Source](https://github.com/moaction/jsonrpc-server)[ Packagist](https://packagist.org/packages/moaction/jsonrpc-server)[ RSS](/packages/moaction-jsonrpc-server/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (3)Used By (1)

jsonrpc-server
==============

[](#jsonrpc-server)

Server implementation for JsonRPC 2.0 protocol

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

```
$server = new \Moaction\Jsonrpc\Server\BasicServer();
$server->addMethod('getUser', function($id) {
  return array(
    'id'   => $id,
    'name' => 'UserName'
  );
});

echo $server->run(file_get_contents('php://input'));
```

### Error reporting

[](#error-reporting)

Every exception in method call will be converted into error object in response. You can specify code and message in exception.

```
$server->addMethod('errorTest', function() {
  throw new \Exception('Strange server error', 42);
});
```

Server response will be:

```
{"jsonrpc": "2.0", "error": {"code": 42, "message": "Strange server error"}, "id": null}
```

If you do not provide code, default "Server Error" code -32000 will be used. As well as error message.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

2

Last Release

4575d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/443011?v=4)[Alexey Ostin](/maintainers/nitso)[@nitso](https://github.com/nitso)

---

Top Contributors

[![nitso](https://avatars.githubusercontent.com/u/443011?v=4)](https://github.com/nitso "nitso (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moaction-jsonrpc-server/health.svg)

```
[![Health](https://phpackages.com/badges/moaction-jsonrpc-server/health.svg)](https://phpackages.com/packages/moaction-jsonrpc-server)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69734.4M145](/packages/algolia-algoliasearch-client-php)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[keboola/storage-api-client

Keboola Storage API PHP Client

10397.4k31](/packages/keboola-storage-api-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)[flowwow/cloudpayments-php-client

cloudpayments api client

2197.1k](/packages/flowwow-cloudpayments-php-client)

PHPackages © 2026

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