List of usage examples for com.fasterxml.jackson.datatype.joda JodaModule addKeyDeserializer
public SimpleModule addKeyDeserializer(Class<?> type, KeyDeserializer deser)
From source file:de.taimos.dvalin.interconnect.model.InterconnectMapper.java
private static ObjectMapper createMapper() { ObjectMapper mapper = new ObjectMapper(); JodaModule jm = new JodaModule(); // make some modifications to ensure correct tz serialization and get map keys working jm.addKeyDeserializer(DateTime.class, new DateTimeKeyDeserializer()); jm.addDeserializer(DateTime.class, new DateTimeDeserializerWithTZ()); mapper.registerModule(jm);/* ww w . ja va 2 s. c o m*/ mapper.registerModule(new GuavaModule()); mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); return mapper; }