code: public static String stringify(Object object, String indentString) throws IOException {
          if (object == null) {
              return null;
          }
          Writer out = new StringWriter();
          JsonWriter jsonWriter = new JsonWriter(out, indentString);
          jsonWriter.write(object);
          jsonWriter.close();
          return out.toString();
      }
docs: Converts an object to a JSON formatted string.
  If pretty-printing is enabled, includes spaces, tabs and new-lines to make the format more readable.
  
  @param object an object to convert to a JSON formatted string
  @param indentString the string that should be used for indentation when pretty-printing is enabled
  @return the JSON formatted string
  @throws IOException if an I/O error has occurred