Some sample code shows behavior of serde_json.
I used to write code like
val.as_object().unwrap().get("field_name").unwrap().as_object().unwrap().get_("sub_field_name").as_str().unwrap().
Turns out that using index of serde_json makes code much less verbose.
No comments:
Post a Comment