Skip to content

Commit

Permalink
fix mappers
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyachakilam committed Nov 3, 2024
1 parent f2182d5 commit e8bef0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.fasterxml.jackson.databind.jsontype.TypeIdResolver;
import com.fasterxml.jackson.databind.util.ClassUtil;
import com.fasterxml.jackson.datatype.guava.GuavaModule;
import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.google.common.annotations.VisibleForTesting;
import org.apache.druid.java.util.common.StringUtils;

Expand Down Expand Up @@ -70,7 +69,6 @@ public DefaultObjectMapper(JsonFactory factory, @Nullable String serviceName)
registerModule(new StringComparatorModule());
registerModule(new SegmentizerModule());
registerModule(new AppendableIndexModule());
registerModule(new JodaModule());

configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
configure(MapperFeature.AUTO_DETECT_GETTERS, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.datatype.joda.deser.DurationDeserializer;
import com.fasterxml.jackson.datatype.joda.deser.PeriodDeserializer;
import com.fasterxml.jackson.datatype.joda.ser.DurationSerializer;
import org.apache.druid.java.util.common.DateTimes;
import org.apache.druid.java.util.common.Intervals;
import org.joda.time.DateTime;
Expand All @@ -55,7 +56,7 @@ static SimpleModule register(SimpleModule module)
module.addDeserializer(Period.class, (JsonDeserializer<Period>) periodDeserializer);
module.addSerializer(Period.class, ToStringSerializer.instance);
module.addDeserializer(Duration.class, new DurationDeserializer());
module.addSerializer(Duration.class, ToStringSerializer.instance);
module.addSerializer(Duration.class, new DurationSerializer());

return module;
}
Expand Down

0 comments on commit e8bef0c

Please sign in to comment.