pub fn flatten_array<S: Serializer, T: Serialize>(
x: &Vec<T>,
s: S,
) -> Result<S::Ok, S::Error>Expand description
If the array has a single item, don’t serialize as an array
ⓘ
#[serde(serialize_with = "flatten_array")]