JSON-RPC Generator

Generate JSON-RPC requests, responses and notifications with a user-friendly interface.

Generator Configuration

Generate multiple requests/responses in a single JSON array

Configure Message

Enter valid JSON array

Generated JSON

Loading...

JSON-RPC Generator Usage Guide

How to use this tool to generate JSON-RPC messages.

1. Select Version and Type
Choose between JSON-RPC 1.0 and 2.0, and select the message type you want to generate.
2. Configure Parameters
Fill in the form with the parameters for your message such as method name, params, result, or error details.
3. Generate Message
Click the generate button to create your message. The result will appear in the JSON editor.
4. Copy or Modify
Copy the generated JSON or modify it directly in the editor. You can also use templates as starting points.
Batch Mode
Enable batch mode to generate multiple requests or responses in a single JSON array. This is useful for testing batch processing capabilities of JSON-RPC servers.

Frequently Asked Questions

What's the difference between JSON-RPC 1.0 and 2.0?
JSON-RPC 2.0 adds the 'jsonrpc: "2.0"' version identifier, supports named parameters (objects) and positional parameters (arrays), includes notification messages (no ID), and has standardized error objects with reserved error codes.
What is a notification in JSON-RPC?
A notification is a request without an ID field, indicating that no response is expected. It's only available in JSON-RPC 2.0 and is useful for one-way messaging.
Can I have both 'result' and 'error' in a response?
No, a JSON-RPC response must contain either a 'result' field or an 'error' field, but never both. If the request succeeded, include 'result'; if it failed, include 'error'.
What should I use for the ID field?
The ID can be a string, number, or null. It's used to match responses to requests. For error responses regarding invalid JSON, use null. Otherwise, use the same ID that was in the request.
What are batch requests?
Batch requests allow sending multiple JSON-RPC calls in a single request by wrapping them in a JSON array. The server responds with an array of responses in the same order.