Skip to main content

deserialize_from_str_opt

Function deserialize_from_str_opt 

Source
pub fn deserialize_from_str_opt<T: DeserializeOwned>(
    json_str: &str,
) -> Option<T>
Expand description

Deserialize JSON string to any type, returning None on error.

Optional deserialization - returns None if JSON is invalid. Convenience function for cases where None represents missing data.