Open aknarts opened 2 years ago
I did identify where the wrong tag comes in https://github.com/RReverser/serde-xml-rs/blob/master/src/ser/seq.rs#L26-L29 which closes the </val>
after the first enum and then the next call to build_start_tag()
opens <content>
because that is the curent_tag
And that is it from me, somebody way more knowledgeable than me in this matter has got to figure this one out. Trying to look into how serde_json does it makes my head hurt.
Not sure if this helps
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser] Struct Test
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser::map] field val
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser] Sequence
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser] Struct variant FirstEnum
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser::map] field content
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser::map] end field
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser] Struct variant SecondEnum
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser::map] field cont
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser::map] end field
[2022-09-09T20:17:47Z DEBUG serde_xml_rs::ser::map] end field
I am trying to serialize this
Sadly this ends up being
I think the expected output would be
Or am I doing something wrong here?