From 478106fd427ed695db5a2c2cc7429295ce3a36e7 Mon Sep 17 00:00:00 2001 From: tilpner Date: Thu, 28 Sep 2017 20:30:28 +0200 Subject: [PATCH] Serialize sync_events::Filter untagged This is to make Filter::FilterId(String::from("0")) serialize as "0", instead of to a JSON object that cannot be passed as a query paramater --- src/r0/sync.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/r0/sync.rs b/src/r0/sync.rs index 5b897fdc..7a45c35b 100644 --- a/src/r0/sync.rs +++ b/src/r0/sync.rs @@ -260,6 +260,7 @@ pub mod sync_events { /// A filter represented either as its full JSON definition or the ID of a saved filter. #[derive(Clone, Debug, Deserialize, Serialize)] + #[serde(untagged)] pub enum Filter { /// A complete filter definition serialized to JSON. FilterDefinition(FilterDefinition),