JavaType valueType = mapper.getTypeFactory().
constructType(new TypeReference<Map<String,PropertyValue<?>>>() { }.getType());
DeserializerProvider provider = ctxt.getDeserializerProvider();
JsonDeserializer<?> deser = provider.findTypedValueDeserializer(ctxt.getConfig(), valueType, null);
if (deser == null) { // can this happen?
throw new JsonMappingException("Can not find a deserializer for type "+ valueType);
}
@SuppressWarnings({"unchecked"})
Map<String, PropertyValue<?>> map = (Map<String, PropertyValue<?>>)deser.deserialize(jp, ctxt);
return new NestedProperties(map);
}
case START_ARRAY:
{
JavaType valueType = mapper.getTypeFactory().
constructType(new TypeReference<List<String>>() { }.getType());
DeserializerProvider provider = ctxt.getDeserializerProvider();
JsonDeserializer<?> deser = provider.findTypedValueDeserializer(ctxt.getConfig(), valueType, null);
if (deser == null) { // can this happen?
throw new JsonMappingException("Can not find a deserializer for type "+ valueType);
}
@SuppressWarnings({"unchecked"})
List<String> list = (List<String>)deser.deserialize(jp, ctxt);