client-api/src/main/java/com/streamsets/datacollector/client/ApiClient.java
public String serialize(Object obj, String contentType) throws ApiException {
    if (contentType.startsWith("application/json")) {
      return json.serialize(obj);
    } else {
      throw new ApiException(400, "can not serialize object into Content-Type: " + contentType);
    }
  }
public String serialize(Object obj, String contentType) throws ApiException {
    if (contentType.startsWith("application/json")) {
      return json.serialize(obj);
    } else {
      throw new ApiException(400, "can not serialize object into Content-Type: " + contentType);
    }
  }
Serialize the given Java object into string according the given
Content-Type (only JSON is supported for now).