pub fn default_on_error<'de, D, T>(
deserializer: D,
) -> Result<T, <D as Deserializer<'de>>::Error>
Expand description
Helper function for returning a default value if deserialization of the type fails.
Assumes that the content being deserialized is JSON.
Used as #[serde(deserialize_with = "default_on_error")]
.