Skip to main content

fallback_text_from_json

Function fallback_text_from_json 

Source
pub fn fallback_text_from_json(v: &Value) -> String
Expand description

Pretty JSON fallback used when a type does not implement TextFormat.

This produces a nicely indented JSON string, or falls back to compact JSON if pretty-printing fails.