|
JSON RPC
JSON-RPC 2.0 library for C++
|
Represents a JSON RPC request. More...
#include <request.h>
Static Public Member Functions | |
| static jsonrpc_request | from_json (const nlohmann::json &request) |
| Parses and validates a JSON RPC request. | |
Public Attributes | |
| nlohmann::json | extra |
| Extra fields from the JSON RPC request. | |
| nlohmann::json | id |
| The ID of the request. | |
| std::string | jsonrpc |
| The JSON RPC version. | |
| std::string | method |
| The name of the method to be invoked. | |
| nlohmann::json | params |
| The parameters for the method. | |
Represents a JSON RPC request.
This struct holds the components of a JSON RPC request, including the JSON RPC version, method name, parameters, and ID.
|
static |
Parses and validates a JSON RPC request.
| request | The JSON RPC request as a nlohmann::json object. |
This method extracts the components of a JSON RPC request from the provided JSON object and validates the request, ensuring that all required fields are present and correctly formatted.
| exception | If the request is invalid. |
Definition at line 62 of file request.cpp.
| nlohmann::json wwa::json_rpc::jsonrpc_request::extra |
| nlohmann::json wwa::json_rpc::jsonrpc_request::id |
| std::string wwa::json_rpc::jsonrpc_request::jsonrpc |
| std::string wwa::json_rpc::jsonrpc_request::method |
| nlohmann::json wwa::json_rpc::jsonrpc_request::params |