I would like to receive data from a client in Json format and then deserialize it.
#[derive(Deserialize)]
struct First{
number: i32,
second: Second,
}
#[derive(Deserialize)]
struct Second{
title: String,
text: String,
}
#[get("/", format = "application/json", data = "<first>")]
fn new_first(first: Json<First>) {
}
Once deserialized, the data will have the "format" of the structs but I didn't understand how to deserialize it
Thank you in advance!