From 5839cb45527132efff559b2f29fea3b201bdac0a Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sat, 26 Aug 2017 09:54:20 +0900 Subject: [PATCH] Don't serialize typ if None --- src/header.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/header.rs b/src/header.rs index c055355..a2dc921 100644 --- a/src/header.rs +++ b/src/header.rs @@ -8,6 +8,7 @@ pub struct Header { /// The type of JWS: it can only be "JWT" here /// /// Defined in [RFC7515#4.1.9](https://tools.ietf.org/html/rfc7515#section-4.1.9). + #[serde(skip_serializing_if = "Option::is_none")] typ: Option, /// The algorithm used ///