0

I have a microservice that sends json date fields in the following format:

"date":
{
   "dayOfYear":314,
   "dayOfWeek":"WEDNESDAY",
   "month": "NOVEMBER",
   "dayOfMonth": 9,
   "year": 2016,
   "monthValue": 11,
   "nano": 123000000,
   "hour": 10,
   "minute": 30,
   "second": 30,
   "chronology": {
          "id":"ISO",
          "calendarType":"iso8601"
   }
}

and I can't control this format though I need to deserialize this value into LocalDateTime field on my side. The application I'm developing is based on the spring boot and jackson as a json deserializer. Do I have any existent options or Do I need to write my own deserializer to handle this LocalDateTime format?

It seems like jsr310 jackson lib doesn't cover this format but I could miss something here.

Thanks in advance.

mr.nothing
  • 5,141
  • 10
  • 53
  • 77
  • It seems me that [this](https://stackoverflow.com/questions/29956175/json-java-8-localdatetime-format-in-spring-boot) is the reason why you receive this format, but not sure if there is an already present deserializer in the library to deserialize it. – dariosicily Jan 26 '22 at 17:52
  • @dariosicily yeah I know the reason I just try to understand if there is already some solution to cope with this – mr.nothing Jan 26 '22 at 19:56

0 Answers0