Skip to content

v1.0.85

Compare
Choose a tag to compare
@dtolnay dtolnay released this 19 Jan 06:44
· 1222 commits to master since this release
v1.0.85
bb99b31
  • Accept #[serde(alias = "...")] attribute on fields and variants which allows the same field or variant to be deserialized from any of multiple different names in the input (#1458, thanks @Lymia)

    #[derive(Deserialize)]
    struct S {
        #[serde(alias = "old_name")]
        new_name: String,  // will deserialize from either of "old_name" or "new_name"
    }