public static Predicate fromJSON(String json) {
    Map<String, Object> map = new Gson().fromJson(json, PARSED_TYPE);
    return (StringUtils.isEmpty(json) ? null : fromMap(map));
  }
Builds a {@link Predicate} from a JSON-formatted {@link String}

@param json a string containing the details of the predicate to create.
@return a {@link Predicate}
@see #fromMap(Map)
ambari-server/src/main/java/org/apache/ambari/server/collections/PredicateUtils.java