JSONRPCResponse Builder
DSL builder for constructing JSONRPCResponse instances.
Set either result for a success response or error for a failure response.
Type Parameters
T
The type of the result value.
E
The type of the error data.
Example:
val success = jsonRPCResponse<Int> {
id = RequestId(1)
result = 42
}
val failure = jsonRPCResponse<Nothing, Nothing> {
id = RequestId(1)
error = JSONRPCError.methodNotFound()
}Content copied to clipboard
Properties
Functions
Link copied to clipboard
Builds a JSONRPCResponse from the configured properties.
Link copied to clipboard
Builds the error inline using the JSONRPCErrorBuilder DSL.