Skip to main content

json_error

Function json_error 

Source
pub fn json_error(code: &str, message: &str, usage: Option<&str>) -> String
Expand description

{"error":{"code":…,"message":…,"usage":…}} and a newline: the line an error prints on stdout under --json. usage only when given.