Closed jestarray closed 3 years ago
i cant seem to deserialize a nested struct.. e.g
#[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] struct Person { first_name: String, address: Address, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] struct Address { street_name: String, apt_num: u32, } let person: Person = from_str( "((first-name . \"Bob\") (address . ((apt-num . 3) (street-name . \"1234 Rose Bvld\"))))", ) .unwrap();
the corresponding s-expression is: ((first_name . "Bob") (address . ((street_name . "1234 Rose Bvld") (apartment_num . 3)))) is there no support for nested structs or am i doing something wrong?
((first_name . "Bob") (address . ((street_name . "1234 Rose Bvld") (apartment_num . 3))))
nevermind, they do work
i cant seem to deserialize a nested struct.. e.g
the corresponding s-expression is:
((first_name . "Bob") (address . ((street_name . "1234 Rose Bvld") (apartment_num . 3))))
is there no support for nested structs or am i doing something wrong?