pub fn format(value: &Value, output: &mut String) -> Result<()>
Expand description
The format function is used as the default value formatter for all values unless the user specifies another. It is provided publicly so that it can be called as part of custom formatters. Values are formatted as follows:
Value::Null
=> the empty stringValue::Bool
=> true|falseValue::Number
=> the number, as formatted byserde_json
.Value::String
=> the string, HTML-escaped
Arrays and objects are not formatted, and attempting to do so will result in a rendering error.