Open cathaysia opened 1 year ago
I had this pragram:
use serde::Serialize; #[derive(Serialize)] enum Anmial { Cat, Dog, } #[derive(Serialize)] struct A { field: Anmial, } fn main() { let v = A { field: Anmial::Cat }; println!("{}", serde_xml_rs::to_string(&v).unwrap()); }
then the result is :
<?xml version="1.0" encoding="UTF-8"?> <A> <Cat> <field /> </Cat> </A>
what I expect is :
<?xml version="1.0" encoding="UTF-8"?> <A> <Field> <Cat /> </Field> </A>
I had this pragram:
then the result is :
what I expect is :