adobe / log-parser

An SDK and Tool that allows you to analyse, sort, filter, and search your logs. The added value is that all data is stored in Java objects that can be used for other purposes such as: assertions, reporting, automated decision making.
MIT License
18 stars 8 forks source link

make the exportLogDataToJSON supporting the ZonedDateTime format #185

Closed mickaelgobbo closed 3 days ago

mickaelgobbo commented 3 days ago

Expected Behaviour

This should be fine to have the different exportLogDataToJSON method supporting the java.time.ZonedDateTime format.

Actual Behaviour

Currently it's not the case, and in the structure of the logData which need to be exported, if a java.time.ZonedDateTime is present, we have the issue:

Encountered error while exporting the log data to a JSON file.
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time 
type `java.time.ZonedDateTime` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through 
reference chain: java.util.ArrayList[0]->java.util.HashMap["timestamp"])
baubakg commented 3 days ago

problem reproduced

baubakg commented 3 days ago

Two elements: