Plotly.cpp 0.1.0
A C++ plotting library for expressive, interactive, real-time & streaming data visualization
Loading...
Searching...
No Matches
plotly::detail::JsonRpcResponse Struct Reference

Structure representing a JSON-RPC response object. More...

#include <json_rpc.hpp>

Public Member Functions

auto toJson () const -> nlohmann::json
 Converts the response to a JSON object.

Public Attributes

std::optional< nlohmann::json > id
 Request ID (null for notifications)
std::optional< nlohmann::json > result
 The result of the request (if successful)
std::optional< JsonRpcErrorerror
 The error object (if request failed)
std::string jsonrpc = "2.0"
 JSON-RPC version string.

Detailed Description

Structure representing a JSON-RPC response object.

Member Function Documentation

◆ toJson()

auto plotly::detail::JsonRpcResponse::toJson ( ) const -> nlohmann::json
nodiscard

Converts the response to a JSON object.

Returns
JSON object representation of the response.

Member Data Documentation

◆ error

std::optional<JsonRpcError> plotly::detail::JsonRpcResponse::error

The error object (if request failed)

◆ id

std::optional<nlohmann::json> plotly::detail::JsonRpcResponse::id

Request ID (null for notifications)

◆ jsonrpc

std::string plotly::detail::JsonRpcResponse::jsonrpc = "2.0"

JSON-RPC version string.

◆ result

std::optional<nlohmann::json> plotly::detail::JsonRpcResponse::result

The result of the request (if successful)


The documentation for this struct was generated from the following files: