You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently that is impossible by design. Serde has no "comment" fields in their data model, so no any serializer is able to write comments from the data structs (of course, serializers can write comments, but their will not be data-driven). The only workaround is to create a special type that, when serialized, will write comment and teach each serializer that it should serialize that type in a special manner. The similar approach is used by the serde-spanned, but for deserialization.
It seems to me, that that special type should live in a separate crate, and if one will exist, I'm not against a PR that will add a support of that crate to quick-xml.
Is there a way to add comments when using quick_xml serde serialization? I've tried to implement something like:
but serialize_str transform '<' & '>' character into their xml equivalent...
The text was updated successfully, but these errors were encountered: