0

I'm trying to use jackson mapper to deserialize a Json File, one of the field in the json file is a unix timestamp, this is part of the json look like:

    "shipment": {
        "shipDate": 1518040533
    }

This is the how the mapper works in action:

        InputStream inputStream = this.getclass().getResourceAsStream(pathToFile))
        return mapper.readValue(inputStream, dataClazz);

The unix timestamp should be : Wednesday, February 7, 2018 9:55:33 PM

But after deserialization, it turned out to be: Sun Jan 18 13:40:40 UTC 1970

Any idea if this is jackon mapper's fault?

Thanks in advance!

DawnZHANG
  • 339
  • 2
  • 4
  • 15

0 Answers0