JavaType contentType = type.getContentType();
/** * Method called to finalize setup of this deserializer, * after deserializer itself has been registered. This * is needed to handle recursive and transitive dependencies. */ @Override public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { KeyDeserializer keyDeser = _keyDeserializer; JsonDeserializer<?> deser = _valueDeserializer; TypeDeserializer typeDeser = _typeDeserializerForValue; // Do we need any contextualization? if ((keyDeser != null) && (deser != null) && (typeDeser == null)) { // nope return this; } if (keyDeser == null) { keyDeser = ctxt.findKeyDeserializer(_mapType.getKeyType(), property); } if (deser == null) { deser = ctxt.findContextualValueDeserializer(_mapType.getContentType(), property); } if (typeDeser != null) { typeDeser = typeDeser.forProperty(property); } return withResolved(keyDeser, typeDeser, deser); }
public synchronized Class<?> fetchOrCreatePairClass(MapType mapType) { ClassPair classPair = new ClassPair(mapType.getKeyType().getRawClass(), mapType.getContentType().getRawClass()); return fetchOrCreatePairClass(classPair); }
@Override public JsonSerializer<?> findMapSerializer(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) { // without this logic, Jackson will not be able to handle maps containing // hibernate proxies if (AbstractEntity.class.isAssignableFrom(type.getContentType().getRawClass())) { Object filterId = config.getAnnotationIntrospector().findFilterId((Annotated)beanDesc.getClassInfo()); return MapSerializer.construct( config.getAnnotationIntrospector().findPropertyIgnorals(beanDesc.getClassInfo()).getIgnored(), type, false, elementTypeSerializer, keySerializer, elementValueSerializer, filterId); } else { return null; } }
/** * Method called to finalize setup of this deserializer, * after deserializer itself has been registered. This * is needed to handle recursive and transitive dependencies. */ @Override public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { KeyDeserializer keyDeser = _keyDeserializer; JsonDeserializer<?> deser = _valueDeserializer; TypeDeserializer typeDeser = _typeDeserializerForValue; // Do we need any contextualization? if ((keyDeser != null) && (deser != null) && (typeDeser == null)) { // nope return this; } if (keyDeser == null) { keyDeser = ctxt.findKeyDeserializer(_mapType.getKeyType(), property); } if (deser == null) { deser = ctxt.findContextualValueDeserializer(_mapType.getContentType(), property); } if (typeDeser != null) { typeDeser = typeDeser.forProperty(property); } return withResolved(keyDeser, typeDeser, deser); }
/** * Method called to finalize setup of this deserializer, * after deserializer itself has been registered. This * is needed to handle recursive and transitive dependencies. */ @Override public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { KeyDeserializer keyDeser = _keyDeserializer; JsonDeserializer<?> deser = _valueDeserializer; TypeDeserializer typeDeser = _typeDeserializerForValue; // Do we need any contextualization? if ((keyDeser != null) && (deser != null) && (typeDeser == null)) { // nope return this; } if (keyDeser == null) { keyDeser = ctxt.findKeyDeserializer(_mapType.getKeyType(), property); } if (deser == null) { deser = ctxt.findContextualValueDeserializer(_mapType.getContentType(), property); } if (typeDeser != null) { typeDeser = typeDeser.forProperty(property); } return withResolved(keyDeser, typeDeser, deser); }
JavaType contentType = type.getContentType();
JavaType contentType = type.getContentType();
enums = EnumValues.construct(enumClass, config.getAnnotationIntrospector()); return new EnumMapSerializer(type.getContentType(), staticTyping, enums, elementTypeSerializer, elementValueSerializer);
enums = EnumValues.construct(enumClass, config.getAnnotationIntrospector()); return new EnumMapSerializer(type.getContentType(), staticTyping, enums, elementTypeSerializer, elementValueSerializer);
JavaType contentType = type.getContentType();
JavaType contentType = type.getContentType();
JavaType contentType = type.getContentType();
JavaType contentType = type.getContentType();
keySerializer, elementValueSerializer, filterId); Object suppressableValue = findSuppressableContentValue(config, type.getContentType(), beanDesc); if (suppressableValue != null) { mapSer = mapSer.withContentInclusion(suppressableValue);
keySerializer, elementValueSerializer, filterId); Object suppressableValue = findSuppressableContentValue(config, type.getContentType(), beanDesc); if (suppressableValue != null) { mapSer = mapSer.withContentInclusion(suppressableValue);
keySerializer, elementValueSerializer, filterId); Object suppressableValue = findSuppressableContentValue(config, type.getContentType(), beanDesc); if (suppressableValue != null) { mapSer = mapSer.withContentInclusion(suppressableValue);