On Tue, Oct 27, 2020 at 9:33 AM kaushik tiwari <[email protected]> wrote:

> Hi all, I m facing LocalDateTimeDeserialization issue,gone through with
> various blogs but didn't found the solution which can work for me.
> Added JSR310 dependency as well.
>
> *Json which I want to get deserialized is in this form: *
> {"year":2018,"month":
> "JULY","monthValue":7,"dayOfMonth":20,"hour":20,"minute":3,"second":33,"nano":653000000,"dayOfWeek":"FRIDAY","dayOfYear":201,"chronology":{"calendarType":"iso8601","id":"ISO"}}}
>
>

That is not a format that JSR-310 module supports for `LocalDateTime`, so
it will not work without a custom deserializer of some kind.
It looks like someone serializing LocalDateTime without using jsr310
module, and it getting treated as POJO.
You could either write a custom JsonDeserializer or, maybe, create a POJO
that maps those fields and then write code to construct matching value
instance (actually that would be similar to `Converter` and
`StdConvertingDeserializer` approach).

-+ Tatu +-

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/CAGrxA24qiMYcKUzXPgqP%3DqBL%2BbZEGuSShSxXrhCBumJpAksT6g%40mail.gmail.com.

Reply via email to