pub fn minimize(json_string: &str) -> Result<String, String>Expand description
Minimizes a string of JSON-encoded data.
Input must be valid JSON data in UTF-8 encoding.
The output will use a line feed as newline character between
records, and no trailing whitespace. To customize this behavior,
use a jsonxf::Formatter::minimizer() directly.
ยงExamples:
assert_eq!(
jsonxf::minimize("{ \"a\": \"b\", \"c\": 0 } ").unwrap(),
"{\"a\":\"b\",\"c\":0}"
);
assert_eq!(
jsonxf::minimize("\r\n\tnull\r\n").unwrap(),
"null"
);