From af86a5e8dca93cf1abbab1a64c30116ff1193a98 Mon Sep 17 00:00:00 2001 From: MrCasCode <50764865+MrCasCode@users.noreply.github.com> Date: Sat, 6 Nov 2021 10:42:02 +0100 Subject: [PATCH] Allow capital case on JSONRPC message Some providers send a non-standard typing, so add an alias to allow decoding capital version --- core/src/types/request.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/types/request.rs b/core/src/types/request.rs index adbf0eccd..2b621860c 100644 --- a/core/src/types/request.rs +++ b/core/src/types/request.rs @@ -7,6 +7,7 @@ use super::{Id, Params, Version}; #[serde(deny_unknown_fields)] pub struct MethodCall { /// A String specifying the version of the JSON-RPC protocol. + #[serde(alias = "JSONRPC")] pub jsonrpc: Option, /// A String containing the name of the method to be invoked. pub method: String, @@ -25,6 +26,7 @@ pub struct MethodCall { #[serde(deny_unknown_fields)] pub struct Notification { /// A String specifying the version of the JSON-RPC protocol. + #[serde(alias = "JSONRPC")] pub jsonrpc: Option, /// A String containing the name of the method to be invoked. pub method: String,