Closed as not planned
Description
Hi,
I have some code in which I need to (de)-serialize in the following way:
#[test]
fn issue785() {
#[derive(Debug, Deserialize, Eq, PartialEq, Serialize)]
struct Identifier {
parent: Option<u64>,
}
let ident = Identifier {
parent: None,
};
let mut save_string = String::new();
let mut serializer = quick_xml::se::Serializer::new(&mut save_string);
serializer.indent(' ', 4);
ident.serialize(serializer).unwrap();
let res: Identifier = quick_xml::de::from_str(&save_string).unwrap();
assert_eq!(res, ident);
}
This test does however fail with the current implementation of quick-xml. I have narrowed it down to the deserialize_option
function of the MapValueDeserializer
struct in src/de/map.rs
. Sadly, I do not understand enough about the internals of quick-xml
to contribute anything meaningful. Please let know how I can further help if needed.
PS: I have created a PR #786 to work on this problem.
Activity