- 
                Notifications
    
You must be signed in to change notification settings  - Fork 266
 
Closed
Labels
arraysIssues related to mapping XML content onto arrays using serdeIssues related to mapping XML content onto arrays using serdebugserdeIssues related to mapping from Rust types to XMLIssues related to mapping from Rust types to XML
Description
I have a data file which I cannot (shouldn't ask to) change:
<?xml version="1.0" encoding="utf-8"?>
<root>
	<key>
		<value id="1">text1</value>
		<value id="2">text2</value>
		<value id="3">text3</value>
		<value id="4">text4</value>d
		<value id="5">text5</value>
		<value id="6">text6</value>
	<key>
</root>When I deserialize using quick-xml & serde, I have an error, with this d, which I'd love to ignore completely
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename = "root")]
pub struct Root {
  #[serde(rename = "key")]
  pub key: Key,
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename = "key")]
pub struct Key {
  #[serde(rename = "value")]
  pub values: Option<Vec<Value>>
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename = "Value")]
pub struct Value {
  #[serde(rename = "@id")]
  pub id: String
  #[serde(rename = "$text")]
  pub text: Option<String>
}Error I have and I'd like to ignore is Error: invalid type: string "d", expected struct Value
Metadata
Metadata
Assignees
Labels
arraysIssues related to mapping XML content onto arrays using serdeIssues related to mapping XML content onto arrays using serdebugserdeIssues related to mapping from Rust types to XMLIssues related to mapping from Rust types to XML