docs: static void string(BufferedSink sink, String value) throws IOException {
      String[] replacements = REPLACEMENT_CHARS;
      sink.writeByte('"');
      int last = 0;
      int length = value.length();
      for (int i = 0; i < length; i++) {
        char c = value.charAt(i);
        String replacement;
        if (c < 128) {
          replacement = replacements[c];
          if (replacement == null) {
            continue;
          }
        } else if (c == '\u2028') {
          replacement = "\\u2028";
        } else if (c == '\u2029') {
          replacement = "\\u2029";
        } else {
          continue;
        }
        if (last < i) {
          sink.writeUtf8(value, last, i);
        }
        sink.writeUtf8(replacement);
        last = i + 1;
      }
      if (last < length) {
        sink.writeUtf8(value, last, length);
      }
      sink.writeByte('"');
    }