diff --git a/json/jsonrpc/src/convention.rs b/json/jsonrpc/src/convention.rs index 26e8f2c2..2ef96b7d 100644 --- a/json/jsonrpc/src/convention.rs +++ b/json/jsonrpc/src/convention.rs @@ -109,6 +109,7 @@ pub struct Response { // This member is REQUIRED on error. // This member MUST NOT exist if there was no error triggered during invocation. // The value for this member MUST be an Object as defined in section 5.1. + #[serde(skip_serializing_if = "Option::is_none")] pub error: Option, /// This member is REQUIRED.