pub fn emit_json(value: &Value, kind: &str) -> ExitCodeExpand description
Serialize a JSON value to pretty-printed stdout, returning the appropriate exit code.
On success prints the JSON and returns ExitCode::SUCCESS.
On serialization failure prints an error to stderr and returns exit code 2.