protected Optional<LogData> parseJsonLog(String s, DateFormat dateFormat) {
    try {
      Validator.validate(s);
      final JSONObject jsonObject = new JSONObject(s);
      final Map<String, String> map = toMap(jsonObject);
      return mapToLogData(map, dateFormat);
    } catch (JSONException e) {
      return Optional.empty();

    }
  }
Tries to parse log event in json form using selected date format

@param s          log fragment
@param dateFormat instance of DateFormat
@return Optional of LogData if log event can be extracted, empty if not.
olv-core/src/main/java/pl/otros/logview/parser/json/JsonExtractor.java