use of com.fasterxml.jackson.databind.deser.ContextualDeserializer in project alien4cloud by alien4cloud.
the class JSonMapEntryArrayDeSerializer method createContextual.
@Override
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException {
if (ConditionalEnabledHelper.isEnabled(ctxt, property)) {
BeanDescription beanDesc = ctxt.getConfig().introspect(property.getType());
JsonDeserializer<?> deserializer = ctxt.getFactory().createMapDeserializer(ctxt, (MapType) property.getType(), beanDesc);
if (deserializer instanceof ContextualDeserializer) {
deserializer = ((ContextualDeserializer) deserializer).createContextual(ctxt, property);
}
return new JSonMapEntryArrayDeSerializer(property.getType().getKeyType(), property.getType().getContentType(), deserializer);
}
BeanDescription beanDesc = ctxt.getConfig().introspect(property.getType());
JsonDeserializer<?> deserializer = ctxt.getFactory().createMapDeserializer(ctxt, (MapType) property.getType(), beanDesc);
if (deserializer instanceof ContextualDeserializer) {
return ((ContextualDeserializer) deserializer).createContextual(ctxt, property);
}
return deserializer;
}
Aggregations