What will be the most straightforward way of dealing payloads with dates in java sdk

Things were not an issue until gson was being used, with jackson (introudced in 26 i guess), many of my request /response models are breaking, especially in date field.

One simple thing i can do is convert various date objects(Date, LocalDateTime,OffsetDate ) etc to long.

another option is to write custom converter,

is there a third way out? which could just work out of box approach for dealing with JSR310/ISO-8601 dates?

should i look at using java.time.OffsetDateTime every where?

1 Like

Temporal initializes Jackson with JavaTimeModule. I would recommend looking through its documentation to see if it solves your problems.

1 Like

Yes just noticed that in JacksonJsonPayloadConverter, exploring the options i have with it! Thanks for the pointer!

Note, that GsonPayloadConverter is still available. You just need to configure it instead of the Jackson one.