From d1c816660c0583db33d160e2ef3e980bef0d5a85 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Mon, 27 May 2024 00:59:23 +0200 Subject: p2p: WIP rpc server implementation for the p2p monitor --- jsonrpc/src/message.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'jsonrpc/src/message.rs') diff --git a/jsonrpc/src/message.rs b/jsonrpc/src/message.rs index 55f8314..34d6235 100644 --- a/jsonrpc/src/message.rs +++ b/jsonrpc/src/message.rs @@ -24,9 +24,10 @@ pub const INTERNAL_ERROR_CODE: i32 = -32603; #[derive(Debug, Serialize, Deserialize)] pub struct Request { pub jsonrpc: String, - pub method: String, - pub params: serde_json::Value, pub id: serde_json::Value, + pub method: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub params: Option, } #[derive(Debug, Serialize, Deserialize)] -- cgit v1.2.3