Function mtml_parser::to_json

source ·
pub fn to_json(node: Node) -> String
Expand description

Serialize AST to JSON.

Examples

use mtml_parser::{parse, to_json};

let node = match parse("<body><mt:Entries><mt:EntryTitle /></mt:Entries></body>") {
  Ok(node) => node,
  Err(err) => panic!("{}", err),
};
to_json(node);