Skip to main content

one_or_many

fn one_or_many<'de, D, T>(deserializer: D) -> Result<Option<Vec<T>>, D::Error>
where D: Deserializer<'de>, T: Deserialize<'de>,
Expand description

serde_urlencoded reads a single occurrence of a key as a scalar, not a one-element sequence, so a Vec field otherwise refuses a query string that repeats the parameter zero or one times.