1 2 3 4 5 6 7
use serde::{Deserialize, Serialize}; pub type Foo = FooType; #[derive(Debug, Deserialize, Serialize)] pub struct FooType { #[serde(default, rename = "@id")] pub id: Option<String>, }