Open bbigras opened 5 years ago
Hi Bruno,
You use case is interesting. It's not possible right now. It requires to support issue #8 and I think also #2 but not sure.
I don't have to much time to spend on the library right now. I hope next month it will be better to solve issues.
I think right now, if it's urgent, right your own deserialiser as describe in the README.
What's the status of this? I have a XML protocol like this that I want to interact with from Rust. I see both #8 and #2 are implemented, does that mean that this is now possible?
Hi @WesleyAC, sorry for the delay. I think it's not possible yet, it may requires to implement a new field attribute like:
struct Group {
[yaserde(field_as_attribute='name')]
value1: String, // containing 'a'
[yaserde(field_as_attribute='name')]
value2: String, // containing 'b''
}
or on structure:
[yaserde(field_as_attribute='name')]
struct Group {
value1: String, // containing 'a'
value2: String, // containing 'b''
}
I'm not sure if my title is right but is it possible to deserialize this XML:
into
I know I could do a
Something
struct and deserialize into aVec<Something>
but I'm wondering if it's possible the other way.