Skip to main content

encode

Function encode 

Source
pub fn encode(
    records: &[Value],
    root_element: &str,
    record_element: &str,
) -> Result<Vec<u8>, FaucetError>
Available on crate feature file-format-xml only.
Expand description

Write records as XML: <root><record>…</record>…</root>.

Scalars become text elements; a nested object becomes a nested element; an array becomes a repeated element, which is the shape decode reads back.