docs: public static String rowToString(JSONArray ja) {
      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < ja.length(); i += 1) {
        if (i > 0) {
          sb.append(',');
        }
        Object o = ja.opt(i);
        if (o != null) {
          String s = o.toString();
          if (s.length() > 0 && (s.indexOf(',') >= 0 || s.indexOf('\n') >= 0 || s.indexOf('\r') >= 0 || s.indexOf(0) >= 0 || s.charAt(0) == '"')) {
            sb.append('"');
            int length = s.length();
            for (int j = 0; j < length; j += 1) {
              char c = s.charAt(j);
              if (c >= ' ' && c != '"') {
                sb.append(c);
              }
            }
            sb.append('"');
          } else {
            sb.append(s);
          }
        }
      }
      sb.append('\n');
      return sb.toString();
    }