writeJSONString
fn
void writeJSONString(Sink)(scope const(char)[] s, ref Sink sink, const bool asciiOnly = false, const char quote = '"') if (is(typeof(sink.put("test"))) || is(typeof(sink.put('c')))) @safeWrite a JSON/JSON5 string literal (including surrounding quotes) to sink.
Parameters
s | UTF-8 bytes to write. |
sink | Output sink with put overloads. |
asciiOnly | When true, escape non-ASCII code points. |
quote | Quote character to use. |