Hello Aisssa,

SimpleDateFormat, and java.util.Date are obsolete since JDK 1.8.

Also, it can quite dangerous to use a class like SimpleDateFormat in a
distributed system because it is not thread-safe.

I suggest you use
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
for
parsing string text,and
one of the date and time classes in the java.time package. But you should't
actually have to do any form of parsing date and time because Jackson
should do it for you if configured correctly.

You'll have to configure Jackson to use these the java.time package as
instructed here:

https://github.com/FasterXML/jackson-modules-java8


On Thu, Jun 25, 2020 at 3:58 PM Aissa Elaffani <aissaelaff...@gmail.com>
wrote:

> Hello guys,
> I want to deserialize a kafka message in JSON format to a POJO, using
> Jackso mapper, and I am having a problem deserializing the date item in the
> json message. I am going to show you my date pattern format, and what i got
> as result! I hope someone can help me ! Please.
> [image: problemDeserialization.JPG]
> [image: dateFormat.JPG]
> Thank you !
>

Reply via email to