code: public static JSONObject getJsonObjectIfInterestingAndUsable(String jsonString) {
          logger.trace("finding event for jsonString: {}", jsonString);
          if (jsonString == null || jsonString.length() <= 0) {
              return null;
          }
          try {
              JSONObject jsonObject = (JSONObject)JSONSerializer.toJSON(jsonString);
              logger.debug("Parsed a JSONObject");
              if (isInterestingAndUsable(jsonObject)) {
                  return jsonObject;
              }
          } catch (Exception ex) {
              logger.warn("Unanticipated error when examining JSON String", ex);
          }
          return null;
      }
docs: Tries to parse the provided string into a JSONObject and returns it if it is interesting and usable.
  If it is interesting is determined by:
  <ol>
  <li>The object contains a String field named type</li>
  <li>The String returns a non null GerritEventType from
  {@link GerritEventType#findByTypeValue(java.lang.String) }</li>
  <li>The property {@link GerritEventType#isInteresting() } == true</li>
  </ol>
  It is usable if the type's {@link GerritEventType#getEventRepresentative() } is not null.
  @param jsonString the string to parse.
  @return an interesting and usable JSONObject, or null if it is not.