code: public final String toJsonString(
      final String source) throws Exception {
      StringBuffer sb = new StringBuffer();
      boolean isStartSpaces = false;
      for (int i = 0; i < source.length(); i++) {
        char ch = source.charAt(i);
        isStartSpaces = addJsonChar(ch, sb, isStartSpaces);
      }
      return sb.toString();
    }
docs: <p>Convert string to JSON string.
  I.e. replace new lines with '\n' (U+000A) and so on.
  It also close Reader cause it's assumed
  to be used it a JSP page.
  JSP make a lot of userless new lines, spaces,
  so they will be removed</p>
  @param source to be converted
  @return String JSON adapted
  @throws Exception an exception