Skip to main content

from_json

Function from_json 

Source
pub fn from_json<T>(value: Value) -> T
Expand description

Deserialize a serde_json::Value into T, falling back to T::default() on error.

Replaces the boilerplate pattern:

serde_json::from_value(v).unwrap_or_default()