I need to consume a Rest API using Java/Spring (RestTemplate). After doing some smoke test with Postman I see the dates fields have this structure
"clipStartDate": {
"__type": "Date",
"iso": "2010-09-14T00:00:00.000Z"
}
I tried to map this fields in my DTO using java.time.LocalDateTime.
But I'm getting a serialization exception. (org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot construct instance of java.time.LocalDateTime
)
What is the best practice in this case?