zpl_toolchain_core 0.4.1

Core parser, emitter, and validator for ZPL II label code (part of the zpl-toolchain project)
Documentation
1
2
3
4
5
6
use super::ast::Ast;

/// Serialize an AST to a pretty-printed JSON string.
pub fn to_pretty_json(ast: &Ast) -> String {
    serde_json::to_string_pretty(ast).expect("Ast serialization cannot fail")
}