pub struct XmlToJson { /* private fields */ }Implementations§
Source§impl XmlToJson
impl XmlToJson
Sourcepub fn xml_to_json(&self, xml: &str) -> Result<Value, Box<dyn Error>>
pub fn xml_to_json(&self, xml: &str) -> Result<Value, Box<dyn Error>>
Parse XML string and return serde_json Value
Sourcepub fn with_root(self) -> Self
pub fn with_root(self) -> Self
parse with XML root, default is false as serde_json usually doesn’t parse the root
Sourcepub fn with_text_name(self, text_name: &str) -> Self
pub fn with_text_name(self, text_name: &str) -> Self
change name of inner XML value
pub fn make_compatible_to_serde(self, input: Value) -> Value
pub fn rename_keys(input: Value, old_key: &str, new_key: &str) -> Value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XmlToJson
impl RefUnwindSafe for XmlToJson
impl Send for XmlToJson
impl Sync for XmlToJson
impl Unpin for XmlToJson
impl UnwindSafe for XmlToJson
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more