JSON::RPC::Response
Inherits JSON::Serializable < Struct < Value < Object
A single JSON-RPC 2.0 response object.
Exactly one of {#result} or {#error} is present for a well-formed
response. Results are exposed as JSON::Any so the caller can convert
them into whatever concrete type the method is documented to return.
Constructors
new(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
error
Sourceid
The id echoes the request id. Typed as JSON::Any? because the
specification permits a string, number, or null.
jsonrpc
Sourceresult
Sourceresult!
Returns the result, raising the corresponding {Error} when the response represents a failure.