Function jsonxf::minimize [−][src]
pub fn minimize(json_string: &str) -> Result<String, String>
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" );