Skip to content

Commit

Permalink
implement xml_string_to_json with sml_str_to_json
Browse files Browse the repository at this point in the history
  • Loading branch information
cjschneider2 committed Jan 27, 2022
1 parent 4f05ad2 commit a95a0d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ fn xml_to_map(e: &Element, config: &Config) -> Value {

/// Converts the given XML string into `serde::Value` using settings from `Config` struct.
pub fn xml_string_to_json(xml: String, config: &Config) -> Result<Value, Error> {
let root = Element::from_str(xml.as_str())?;
Ok(xml_to_map(&root, config))
xml_str_to_json(xml.as_str(), config)
}

/// Converts the given XML string into `serde::Value` using settings from `Config` struct.
Expand Down

0 comments on commit a95a0d8

Please sign in to comment.