public static RpcResponse FromJson(JObject json) { RpcResponse response = new() { Id = json["id"], JsonRpc = json["jsonrpc"].AsString(), Result = json["result"] }; if (json["error"] != null) { response.Error = RpcResponseError.FromJson(json["error"]); } return(response); }
public static RpcResponse FromJson(JObject json) { var response = new RpcResponse { Id = (int?)json["id"]?.AsNumber(), Jsonrpc = json["jsonrpc"].AsString(), Result = json["result"] }; if (json["error"] != null) { response.Error = RpcResponseError.FromJson(json["error"]); } return(response); }