public String toJSON() {
    Map<String, Object> map = toMap();
    return (map == null) ? null : new Gson().toJson(map);
  }
Serialize this {@link Predicate} to a JSON-formatted {@link String}

@return a JSON-formatted {@link String}
ambari-server/src/main/java/org/apache/ambari/server/collections/Predicate.java