diff --git a/src/main/java/com/norconex/commons/lang/bean/jackson/JsonXmlMapDeserializer.java b/src/main/java/com/norconex/commons/lang/bean/jackson/JsonXmlMapDeserializer.java index 933f53b4..cbfab40b 100644 --- a/src/main/java/com/norconex/commons/lang/bean/jackson/JsonXmlMapDeserializer.java +++ b/src/main/java/com/norconex/commons/lang/bean/jackson/JsonXmlMapDeserializer.java @@ -125,7 +125,7 @@ private Class fieldType(Class annotType, JavaType containedType) { if (containedType != null) { return containedType.getRawClass(); } - return null; + return Object.class; } @SuppressWarnings("unchecked") diff --git a/src/main/java/com/norconex/commons/lang/bean/jackson/JsonXmlMapModule.java b/src/main/java/com/norconex/commons/lang/bean/jackson/JsonXmlMapModule.java index ed6a766a..e456ca41 100644 --- a/src/main/java/com/norconex/commons/lang/bean/jackson/JsonXmlMapModule.java +++ b/src/main/java/com/norconex/commons/lang/bean/jackson/JsonXmlMapModule.java @@ -15,6 +15,7 @@ package com.norconex.commons.lang.bean.jackson; import java.util.Map; +import java.util.Properties; import com.fasterxml.jackson.databind.module.SimpleModule; import com.norconex.commons.lang.bean.BeanMapper; @@ -33,6 +34,8 @@ public class JsonXmlMapModule extends SimpleModule { public JsonXmlMapModule() { this.addSerializer((Class>) (Class) Map.class, new JsonXmlMapSerializer<>()); + this.addDeserializer((Class>) (Class) Properties.class, + new JsonXmlMapDeserializer<>()); this.addDeserializer(Map.class, new JsonXmlMapDeserializer<>()); } } \ No newline at end of file