1 2 3 4 5 6 7 8 9 10 11
use serde::{Deserialize, Serialize}; pub type Foo = FooType; #[derive(Debug, Deserialize, Serialize)] pub struct FooType { #[serde(rename = "b")] pub b: i32, #[serde(rename = "c")] pub c: String, #[serde(rename = "a")] pub a: f32, }