diff options
author | Valentin Popov <info@valentineus.link> | 2019-01-26 18:10:15 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2019-01-26 18:10:15 +0300 |
commit | af5409ea281243e04f12b831fe7ad195b97ec0aa (patch) | |
tree | e2f87d45abc2597e8e7fe9ad42232853ce58b688 | |
parent | 4edb511fe6bfe020e70d6ade1776dd8099a10ed0 (diff) | |
download | bbb2json-af5409ea281243e04f12b831fe7ad195b97ec0aa.tar.xz bbb2json-af5409ea281243e04f12b831fe7ad195b97ec0aa.zip |
Sat, 26 Jan 2019 19:10:15 +0400
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | src/main.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs index 881237d..061c7ce 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,9 +13,9 @@ use xml::reader::{EventReader, XmlEvent}; #[derive(Serialize, Clone)] struct Record { - externalId: String, - meetingId: String, - meetingName: String, + external_id: String, + meeting_id: String, + meeting_name: String, } fn main() { @@ -25,9 +25,9 @@ fn main() { let parser = EventReader::new(file); let mut data = Record { - externalId: "".to_string(), - meetingId: "".to_string(), - meetingName: "".to_string(), + external_id: "".to_string(), + meeting_id: "".to_string(), + meeting_name: "".to_string(), }; for element in parser { @@ -42,11 +42,11 @@ fn main() { let value: String = attribute.value.to_string(); if name == "externalId" { - data.externalId = value; + data.external_id = value; } else if name == "meetingId" { - data.meetingId = value; + data.meeting_id = value; } else if name == "meetingName" { - data.meetingName = value; + data.meeting_name = value; } } } |