The following struct definition:
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
#[serde(rename_all = "camelCase")]
pub struct Graph {
hash: String,
#[serde(rename = "parent_hash")]
parent_hash: String,
thumb_url: String,
state_url: String,
title: String,
access: String,
created: String,
state: GraphState,
}
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
#[serde(rename_all = "camelCase")]
pub struct GraphState {
pub version: String,
pub random_seed: String,
//pub graph: GraphMeta,
//pub expressions: Vec<Expression>,
}
fails to do a roundtrip serialize->deserialize with the error "missing field version". This is probably either a really obvious case of user error that I'm missing or an issue with serde_derive