code: public static final String serializeToString(final Object object) {
      if (object == null)
        throw new IllegalArgumentException("Object was null");
      try {
        return jsonMapper.writeValueAsString(object);
      } catch (JsonProcessingException e) {
        throw new JSONException(e);
      }
    }
docs: Serializes the given object to a JSON string
  @param object The object to serialize
  @return A JSON formatted string
  @throws IllegalArgumentException if the object was null
  @throws JSONException if the object could not be serialized