pub fn json_escape(s: &str) -> StringExpand description
Escape a Rust string for inclusion in a JSON string literal.
Sufficient for the small, known fields emitted by --format=json
callers (commit messages, hashes, identity strings). Does NOT
handle surrogate pairs — UTF-8 round-trips as itself since JSON
strings are UTF-8.