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

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

beauty-framework/json-rpc
=========================

Beauty JSON RPC

1.0.0(1y ago)00MITPHPPHP &gt;=8.1

Since Jun 29Pushed 1y agoCompare

[ Source](https://github.com/beauty-framework/json-rpc)[ Packagist](https://packagist.org/packages/beauty-framework/json-rpc)[ RSS](/packages/beauty-framework-json-rpc/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Beauty JSON-RPC
===============

[](#beauty-json-rpc)

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

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

**JSON-RPC** is a lightweight protocol for remote procedure calls (RPC) over HTTP(S) or any other transport, where all requests and responses are plain JSON.

- Official spec:
- Minimalistic (no REST routes, just one endpoint)
- Allows calling any method with parameters, returns result or error
- Supports batch (multiple calls in one request)

---

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

[](#installation)

Install the package via Composer:

```
composer require beauty-framework/json-rpc
```

---

Registering Console Commands
----------------------------

[](#registering-console-commands)

Add the command provider:

```
// config/commands.php
return [
    // ...
    \Beauty\JsonRPC\Console\RegisterCommands::commands(),
];
```

---

Quick Start: Setup and Configuration
------------------------------------

[](#quick-start-setup-and-configuration)

1. **Install config** (creates a template for handler auto-discovery):

    ```
    ./beauty jsonrpc:install
    ```

    > After this you’ll have a `config/json-rpc.php` file with auto-discovery settings for your RPC handlers.

    Example `config/json-rpc.php`:

    ```
