code: public final String toJsonStringAndClose(
      final Reader source) throws Exception {
      StringBuffer sb = new StringBuffer();
      int chi;
      boolean isStartSpaces = false;
      while ((chi = source.read()) != -1) {
        char ch = (char) chi;
        isStartSpaces = addJsonChar(ch, sb, isStartSpaces);
      }
      source.close();
      return sb.toString();
    }
docs: <p>Convert source from Reader 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