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
<foo>
<itemname="one">value of string 1</item>
<itemname="two">value of string 2</item>
</foo>
I don't see a easy way to do this kind of thing with quick-xml's serde option — my experiments have been using PhantomData to create a Item<K, V> type where the K is a PhantomData<K> with a custom trait to hold the name, and then I use the serde with attribute, but that feels quite messy and annoying. Is there a easy way to represent this? (I wouldn't choose to use XML like this, but the API I'm using does, unfortunately...)
The text was updated successfully, but these errors were encountered:
There is no built-in mappings for such transformations. Probably, your way to do that is the right approach. If you post your solution here, maybe we could help you to find the ways to optimize it.
I have a struct like:
and I want XML like:
I don't see a easy way to do this kind of thing with quick-xml's serde option — my experiments have been using
PhantomData
to create aItem<K, V>
type where theK
is aPhantomData<K>
with a custom trait to hold the name, and then I use the serdewith
attribute, but that feels quite messy and annoying. Is there a easy way to represent this? (I wouldn't choose to use XML like this, but the API I'm using does, unfortunately...)The text was updated successfully, but these errors were encountered: