Hello,

I declare a custom object mapper with a DateSerializer with a custom format 
like this :

public class CustomObjectMapper extends ObjectMapper
{
    public CustomObjectMapper()
    {
        configure();
    }

    private void configure()
    {
        super.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, 
false);
        JavaTimeModule module = new JavaTimeModule();
        module.addSerializer(Date.class, new DateSerializer(false, new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")));
        super.registerModule(module);
    }
}

And it's OK, but when I want to add a deserializer, I'm expected to do 
something like this :

 module.addDeserializer(Date.class, new DateDeserializer(
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"));

But it's doesn't work because the signature is :

com.fasterxml.jackson.databind.deser.std.DateDeserializers.DateDeserializer.
DateDeserializer(DateDeserializer base, DateFormat df, String formatString)


What I have to put in "DateDeserializer base" and in String formatString ?
I suspect an inconsistency in the code or I don't understand the usage of 
DateDeserializer ? Someone can help me ?

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to