Available on crate features
source-rest and source-xml only.Expand description
XML to JSON conversion.
Converts XML documents to serde_json::Value preserving the element
hierarchy. Attributes are prefixed with @, text content uses #text.
Functions§
- extract_
at_ path - Navigate into a JSON value using a dot-separated path and extract matching records. If the final element is an array, its items are returned individually.
- stream_
extract - Walk an XML document with
quick_xml::Reader::read_eventand invokeon_recordonce per element whose path matches the dot-separatedrecords_element_pathselector. Records are materialised as JSON values in the same shapexml_to_jsonwould produce — attributes become@keyentries, repeated children become arrays, and a single#textchild is flattened to a bare string. - xml_
to_ json - Convert an XML string to a JSON value.