code: protected static String jsonEscape(final String orig) {
          final int length = orig.length();
          final StringBuilder builder = new StringBuilder(length + 32);
          builder.append('"');
          for (int i = 0; i < length; i = orig.offsetByCodePoints(i,1)) {
              final char cp = orig.charAt(i);
              switch(cp) {
              case '"':
                  builder.append("\\\"");
                  break;
              case '\\':
                  builder.append("\\\\");
                  break;
              case '\b':
                  builder.append("\\b");
                  break;
              case '\f':
                  builder.append("\\f");
                  break;
              case '\n':
                  builder.append("\\n");
                  break;
              case '\r':
                  builder.append("\\r");
                  break;
              case '\t':
                  builder.append("\\t");
                  break;
              case '/':
                  builder.append("\\/");
                  break;
              default:
                  if((cp >= '\u0000' && cp <='\u001F') || (cp >= '\u007F' && cp <= '\u009F') || (cp >= '\u2000' && cp <= '\u20FF')){
                      final String hexString = Integer.toHexString(cp);
                      builder.append("\\u");
                      for(int k=0; k < 4-hexString.length(); k++) {
                          builder.append('0');
                      }
                      builder.append(hexString.toUpperCase());
                  } else {
                      builder.append(cp);
                  }
                  break;
              }
          }
          builder.append('"');
          return builder.toString();
      }
docs: Escapes the original string for inclusion in a JSON string.
  @param orig A string to be included in a JSON string.
  @return The string appropriately escaped to produce valid JSON.