JSON-RPC Validator
Validate your JSON-RPC requests and responses against the official specifications.
Configuration
Enable additional warnings and stricter validation checks
Enter JSON-RPC content and click validate to see results
Or load an example from the left panel
JSON-RPC Validator User Guide
Use this tool to validate your JSON-RPC messages against specification requirements
How to Use the Validator
- Select JSON-RPC version - Choose version 1.0 or 2.0 based on your implementation
- Select message type - Request, response, notification (2.0 only), or error response
- Enter or load JSON-RPC content - Type your JSON-RPC message in the editor or select from examples
- Validate - Click the validate button to check your message
- View results - The right panel will display validation results, including any errors or warnings
Validation Features
- Syntax validation - Checks if the message is valid JSON format
- Protocol validation - Verifies compliance with the selected JSON-RPC version specification
- Batch requests - Supports validation of JSON-RPC 2.0 batch requests and responses
- Error indication - Highlights error locations in the editor
- Strict mode - Enables additional checks and best practice warnings
Version Features
Feature | JSON-RPC 1.0 | JSON-RPC 2.0 |
---|---|---|
Version field | Not required | Required ("jsonrpc": "2.0") |
Parameters format | Array only | Array or object |
Notification support | Limited support | Formal support (no id field) |
Batch requests | Not supported | Supported |
Error object | Simple error field | Structured error object |
Additional Features
- Share configuration - Generate a shareable URL that includes your current configuration and content
- Export results - Export validation results as a JSON file
- History - View and load your previous validations
Frequently Asked Questions
Common questions and solutions for the JSON-RPC Validator
Ensure your JSON is correctly formatted. Check for matching brackets, missing commas, and properly quoted strings using a JSON validator.
Always include the "jsonrpc":"2.0" field in your JSON-RPC 2.0 requests or responses. This is a required protocol field.
JSON-RPC requests must include the "method" field. For non-notification requests, the "id" field is also required. JSON-RPC responses must include the "id" field and either a "result" or "error" field.
Batch requests/responses must be a JSON array containing valid JSON-RPC request or response objects. Ensure each element in the array is a complete JSON-RPC message.
In JSON-RPC 1.0, "params" must be an array. In JSON-RPC 2.0, "params" can be either an array (for positional parameters) or an object (for named parameters).
JSON-RPC error objects must include a "code" (number) and "message" (string) field. You can optionally add a "data" field to provide more error information.
Notification requests are requests that do not require a response. In JSON-RPC 2.0, notification requests should include the "method" and "jsonrpc" fields but should not include an "id" field.
Avoid using method names that begin with "rpc." as these are reserved for protocol extensions. Choose method names that do not start with "rpc.".
JSON-RPC Error Codes Reference
Standard predefined error codes and their meanings
Error Code | Message | Meaning |
---|---|---|
-32700 | Parse error | Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |
-32600 | Invalid Request | The JSON sent is not a valid Request object. |
-32601 | Method not found | The method does not exist / is not available. |
-32602 | Invalid params | Invalid method parameter(s). |
-32603 | Internal error | Internal JSON-RPC error. |
-32099 to -32000 | Server error | Reserved for implementation-defined server-errors. |
Custom Error Codes
Servers can define their own error codes, but should avoid using the reserved error code range (-32768 to -32000). It is recommended to use error codes greater than -32000 or less than -32768 for custom error codes.