code: public static String toJSON(int indent, Object object) {
          return toJSON(indent, 1, object, true).toString();
      }
docs: Serializes object as a JSON string. Map objects are serialized as JSON objects, List objects are serialized as
  JSON arrays. Numbers, Booleans, and null are all serialized to their respective JSON types. Other classes will
  be serialised using object.toJSONString if they have it, otherwise they will be serialized using
  String.valueOf(object).
  @param indent the number of spaces to indent the output between elements
  @param object the object to serialize
  @return the JSON string representation of object