Complete these tasks to reinforce what you learned in this module.
Define a struct Person with name: String and age: u32. Deserialize the string r#"{"name": "Alice", "age": 30}"# with serde_json::from_str and print both fields.
Deserialize. Use serde_json::from_str on the JSON string; handle the Result.// Task 1: Deserialize JSON. See tasks/TASKS.md.
fn main() {
todo!("Deserialize Person from JSON string, print");
}
Define a struct Product with id: i32 and name: String. Create an instance, serialize it with serde_json::to_string, and print the JSON string.
Serialize on the struct. Use the serde_json function that turns a value into a JSON string; handle the Result.// Task 2: Serialize to JSON. See tasks/TASKS.md.
fn main() {
todo!("Serialize Product to JSON string, print");
}