protected Optional<LogData> mapToLogData(Map<String, String> map, DateFormat dateParser) {
    LogDataBuilder builder = new LogDataBuilder();

    //TODO parsing level based on custom mapping
    builder.withLevel(i18nLevelParser.parse(map.get(propertyLevel).trim()));
    final Optional<String> dateString = Optional.ofNullable(map.get(propertyDate));

    String message = map.getOrDefault(propertyMessage, "");
    if (map.containsKey(propertyException)) {
      message = message + "\n" + map.get(propertyException);
    }

    builder = builder
      .withDate(dateString.map(d -> parse(dateParser, d)).orElse(new Date()))
      .withMessage(message)
      .withThread(map.getOrDefault(propertyThread, ""))
      .withLoggerName(map.getOrDefault(propertyLogger, ""))
      .withClass(map.getOrDefault(propertyClass, ""))
      .withMethod(map.getOrDefault(propertyMethod, ""))
      .withLineNumber(map.getOrDefault(propertyLine, ""))
      .withFile(map.getOrDefault(propertyFile, ""))
      .withNote(new Note(map.getOrDefault(propertyNote, "")))
      .withNdc(map.getOrDefault(propertyNdc, ""))
    ;
    final String color = map.getOrDefault(propertyMarkerColor, "");
    if (isNotBlank(color)) {
      builder = builder
        .withMarkerColors(MarkerColors.fromString(color))
        .withMarked(true);
    }
    //build mdc
    final Map<String, String> mdc = extractMdc(map, this.propertyKeysToMdc);
    builder = builder.withProperties(mdc);
    return Optional.of(builder.build());
  }
Tries convert json object in map form to log data

@param map        json object in map form, names as xpath separated by dots are keys.
                  <code>
                  {"a": "value1"
                  "b": {
                  "c": "value2"
                  }
                  }
                  </code>
                  will be represented by map
                  a   -> value1,
                  b.c -> value2
@param dateParser date format
@return Optional of LogData in case of success or Optional.empty in case of error
olv-core/src/main/java/pl/otros/logview/parser/json/JsonExtractor.java