Emit a JSON string with standard escaping. `serde_json` produces a valid, minimally-escaped JSON string literal (quotes included), which matches JCS for the ASCII content in our records.
(out: &mut String, s: &str)
| 65 | /// minimally-escaped JSON string literal (quotes included), which matches JCS |
| 66 | /// for the ASCII content in our records. |
| 67 | fn write_json_string(out: &mut String, s: &str) { |
| 68 | out.push_str(&serde_json::to_string(s).expect("string serialization is infallible")); |
| 69 | } |
| 70 | |
| 71 | #[cfg(test)] |
| 72 | mod tests { |