JSON a 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,
}

Introduzione al tool

Questo strumento è uno strumento online per convertire le stringhe JSON in definizioni di struct Rust con supporto serde.