Android 14.0.0 release 36
Snap for 11111096 from 66860b37c4858593eed44ed1ae9bef061e771cc3 to 24Q1-release
Change-Id: Ic36eda18d592fc7dd3b8bd5cd26adb0b802d544f
tree: d947f8267305fd5dc8d7127d4fccf34c195507d5
- .github/
- src/
- tests/
- .cargo_vcs_info.json
- .gitignore
- .travis.yml
- Android.bp
- Cargo.toml
- Cargo.toml.orig
- cargo_embargo.json
- LICENSE
- METADATA
- MODULE_LICENSE_MIT
- OWNERS
- README.md
- rustfmt.toml
- TEST_MAPPING
README.md
serde-xml-rs
xml-rs
based deserializer for Serde (compatible with 1.0)
Example usage
use serde::{Deserialize, Serialize};
use serde_xml_rs::{from_str, to_string};
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct Item {
name: String,
source: String,
}
fn main() {
let src = r#"<Item><name>Banana</name><source>Store</source></Item>"#;
let should_be = Item {
name: "Banana".to_string(),
source: "Store".to_string(),
};
let item: Item = from_str(src).unwrap();
assert_eq!(item, should_be);
let reserialized_item = to_string(&item).unwrap();
assert_eq!(src, reserialized_item);
}