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 2mo ago

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 54% 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

4529d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7c16a24b8122bf5ae525c5fed74175e6b45fa6683cfc34cb9d7cd1ae295d390?d=identicon)[nitso](/maintainers/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

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[avalara/avataxclient

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

517.9M7](/packages/avalara-avataxclient)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

81324.1k1](/packages/alexacrm-dynamics-webapi-toolkit)

PHPackages © 2026

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