diff --git a/glean_parser/templates/rust.jinja2 b/glean_parser/templates/rust.jinja2 index 77850384..8ea718c2 100644 --- a/glean_parser/templates/rust.jinja2 +++ b/glean_parser/templates/rust.jinja2 @@ -21,7 +21,7 @@ Jinja2 template is not. Please file bugs! #} pub struct {{ name }} { {% for itemname, val in struct.properties.items() %} {% if val.type == "array" %} - #[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new")] + #[serde(skip_serializing_if = "Vec::is_empty", default = "Vec::new", deserialize_with = "::glean::traits::__serde_helper::vec_null")] pub {{itemname|snake_case}}: {{ name ~ itemname|Camelize }}, {% elif val.type == "object" %} #[serde(skip_serializing_if = "Option::is_none")]