code: public static String toPrettyPrintedString(final JSONObject jsonObject) {
      ArgumentChecker.notNull(jsonObject, "jsonObject");
      try {
        return jsonObject.toString(JSON_INDENT) + LINE_SEPARATOR;
      } catch (JSONException ex) {
        s_logger.error("Problem converting JSONObject to String", ex);
        throw new QuandlRuntimeException("Problem converting JSONObject to String", ex);
      }
    }
docs: Pretty print a JSONObject as an indented piece of JSON code. Throws a QuandlRuntimeException if it can't render the JSONObject to a
  String.
  
  @param jsonObject the pre-parsed JSON object to pretty-print, not null
  @return a String representation of the object, probably multi-line.