A class representing a JSON-RPC 2.0 response object.

Public fields

id

Id of the request that this response is for

result

Result of the call

error

Error associated with the call

Methods

Public methods


Method new()

Initialize a JSON-RPC response

Usage

JsonRpcResponse$new(id = NULL, result = NULL, error = NULL)

Arguments

id

Id of the request that this response is for

result

Result of the call

error

Error associated with the call


Method dehydrate()

Dehydrate the response to a list

Usage

JsonRpcResponse$dehydrate()


Method serialize()

Serialize the response to JSON

Usage

JsonRpcResponse$serialize()


Method clone()

The objects of this class are cloneable with this method.

Usage

JsonRpcResponse$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.