public String toJson() {
    return GSON.toJson(this);
  }
Gets a JSON representation of this task.

@return a JSON representation of this task.
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/AddComponentTask.java