You'll need to add the JSR-310 module to the program that is creating that JSON.
-Drew On Thursday, October 29, 2020 at 6:27:37 AM UTC-4 [email protected] wrote: > The default jackson serialization of LocalDateTime is the format which I > had sended above, so why it doesn't deserializing the same format. Can > there be some dependency or annotations which can take care of this? > > On Wednesday, October 28, 2020 at 2:25:51 AM UTC+5:30 [email protected] > wrote: > >> 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/e713906b-7379-4e53-b6a6-32e780b549e9n%40googlegroups.com.
