public List<String> extractFieldValues(String json, String field) {
    final List<String> lines = Arrays.stream(json.split("\n")).map(String::trim).collect(Collectors.toList());
    StringBuilder buffer = new StringBuilder();
    List<String> result = new ArrayList<>();
    for (String line : lines) {
      buffer.append(line);
      if (isJson(buffer.toString())) {
        try {
          final JSONObject jsonObject = new JSONObject(buffer.toString());
          buffer.setLength(0);
          Optional.ofNullable(toMap(jsonObject).get(field))
            .ifPresent(result::add);
        } catch (JSONException ignore) {
          //;
        }
      }
    }
    return result;
  }
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