Tells if the response is an error.
Tells if the response is in success.
Convert to Json.
Convert to Json string.
Parse from Json.
Parse from Json string.
Optional error.
id
Optional result.
auto r1 = new JsonRpcResponse!int(); Json json = "hello"; r1.result = json; r1.id = 42; r1.toString().should == `{"result":"hello","id":42,"jsonrpc":"2.0"}`; auto error = new JsonRpcError(); error.code = -32600; error.message = "Invalid Request"; auto r2 = new JsonRpcResponse!int(); r2.error = error; r2.id = 1; r2.toString().should == `{"error":{"code":-32600,"message":"Invalid Request"},"id":1,"jsonrpc":"2.0"}`;
A Json-Rpc response with an id of type TId.