Skip to main content

json_format

Function json_format 

Source
pub fn json_format(
    text: &str,
    indent: Option<&str>,
    eol: &str,
) -> Result<String, String>
Expand description

Re-formats JSON token by token: key order, numbers and string escapes stay exactly as written. Several top-level values (JSON Lines) stay on separate lines. With indent the output is indented, otherwise all insignificant whitespace is removed.