code: protected static void jsonEscape3(StringBuilder sb, String s) {
          for (int i = 0; i < s.length(); i++) {
              char c = s.charAt(i);
              switch (c) {
                  case '\b':
                      sb.append("\\b");
                      break;
                  case '\f':
                      sb.append("\\f");
                      break;
                  case '\n':
                      sb.append("\\n");
                      break;
                  case '\r':
                      sb.append("\\r");
                      break;
                  case '\t':
                      sb.append("\\t");
                      break;
  
                  // Fall through because we just need to add \ (escaped) before the character
                  case '\\':
                  case '\"':
                  case '/':
                      sb.append("\\");
                      sb.append(c);
                      break;
                  default:
                      sb.append(c);
              }
          }
      }
docs: Escape \b, \f, \n, \r, \t, ", \, / characters and appends to a string builder
  
  @param sb String builder to append to
  @param s String to escape