Closed antis81 closed 1 month ago
The source XML I am serializing looks like this:
<property name="abc"> <string>Hello World!</string> </property>
Now I like to use the "string" to differentiate property types (string, bool, int, …).
#[derive(PartialEq, Debug, YaDeserialize)] #[yaserde(rename = "property")] pub struct Property { #[yaserde(attribute)] pub name: String, #[yaserde()] pub value: Option<PropertyValue>, } #[derive(PartialEq, Debug, YaDeserialize)] pub struct PropertyValue { #[yaserde(tag)] pub prop_type: String, #[yaserde()] pub prop_value: String, }
Is it implemented already? I couldn't find any documentation about that.
XML enum is exactly meant for this -> closing
The source XML I am serializing looks like this:
Now I like to use the "string" to differentiate property types (string, bool, int, …).
Is it implemented already? I couldn't find any documentation about that.