pub fn write_error_json<W: Write>(w: &mut W, message: &str) -> Result<()>
v1 error object: {"error":"<escaped message>"}. No trailing newline — the CLI appends one for stdout, the reactor returns the bytes as-is.
{"error":"<escaped message>"}