PHPackages                             tourze/json-rpc-endpoint-bundle - 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. tourze/json-rpc-endpoint-bundle

ActiveSymfony-bundle[API Development](/categories/api)

tourze/json-rpc-endpoint-bundle
===============================

JsonRPC解析、处理模块

2.0.0(4mo ago)02.3k6MITPHPCI passing

Since Apr 27Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/json-rpc-endpoint-bundle)[ Packagist](https://packagist.org/packages/tourze/json-rpc-endpoint-bundle)[ RSS](/packages/tourze-json-rpc-endpoint-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (25)Versions (7)Used By (6)

JSON-RPC Endpoint Bundle
========================

[](#json-rpc-endpoint-bundle)

[![PHP Version](https://camo.githubusercontent.com/acffb6ae1962992d26e4466782832787e79504a6250f80d732c4283458b9f497/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e312d626c75652e737667)](https://php.net)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)\[[![Build Status](https://camo.githubusercontent.com/280d6a8b0e729882b4a69c062537a84c6bdd8adb58c510e16ca48c5940a858ce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f746573742e796d6c3f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/280d6a8b0e729882b4a69c062537a84c6bdd8adb58c510e16ca48c5940a858ce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f746573742e796d6c3f6272616e63683d6d6173746572)\] () \[[![Code Coverage](https://camo.githubusercontent.com/83f9bb21cdd80cfba1e605e63af9b92ee389ca4e847866e98494d2721727c718/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f2f6d6173746572)](https://camo.githubusercontent.com/83f9bb21cdd80cfba1e605e63af9b92ee389ca4e847866e98494d2721727c718/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f2f6d6173746572)\] ()

[English](README.md) | [中文](README.zh-CN.md)

A Symfony bundle for handling JSON-RPC 2.0 endpoints, providing complete JSON-RPC request parsing, processing, and response functionality.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Advanced Usage](#advanced-usage)
- [Example Requests](#example-requests)
- [Dependencies](#dependencies)
- [Contributing](#contributing)
- [License](#license)

Features
--------

[](#features)

- Complete JSON-RPC 2.0 protocol support
- Batch request processing
- Event-driven architecture
- Request/response serialization and deserialization
- Parameter validation
- Exception handling
- Performance monitoring (using Stopwatch)
- Result appending functionality

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

[](#installation)

```
composer require tourze/json-rpc-endpoint-bundle
```

Configuration
-------------

[](#configuration)

The bundle provides default configuration and usually doesn't require additional configuration. If customization is needed, you can configure it in `config/packages/json_rpc_endpoint.yaml`.

Usage
-----

[](#usage)

### 1. Enable the Bundle in Symfony Project

[](#1-enable-the-bundle-in-symfony-project)

```
// config/bundles.php
return [
    // ...
    Tourze\JsonRPCEndpointBundle\JsonRPCEndpointBundle::class => ['all' => true],
];
```

### 2. Create JSON-RPC Endpoint Controller

[](#2-create-json-rpc-endpoint-controller)

```
