JSON para Rust Struct

#[derive(Serialize, Deserialize)]
pub struct Address {
    pub city: String,
    pub zip: String,
}

#[derive(Serialize, Deserialize)]
pub struct Root {
    pub name: String,
    pub age: i64,
    pub address: Address,
}

Introdução à ferramenta

Esta ferramenta é uma ferramenta online para converter strings JSON em definições de structs Rust com suporte serde.