@Override public JsonDeserializer<?> findCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException { return (_classMappings == null) ? null : _classMappings.get(new ClassKey(type.getRawClass())); }
public JsonDeserializer<?> findCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException { return (_classMappings == null) ? null : _classMappings.get(new ClassKey(type.getRawClass())); }
public JsonDeserializer<?> findCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException { return (_classMappings == null) ? null : _classMappings.get(new ClassKey(type.getRawClass())); }
@Override public JsonDeserializer<?> findCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException { return (_classMappings == null) ? null : _classMappings.get(new ClassKey(type.getRawClass())); }
@Override public JsonDeserializer<?> findCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException { return (_classMappings == null) ? null : _classMappings.get(new ClassKey(type.getRawClass())); }
@Override public JsonSerializer<?> findCollectionLikeSerializer(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) { Class<?> raw = type.getRawClass(); if (raw == CharSeq.class) { return new CharSeqSerializer(type); } if (Seq.class.isAssignableFrom(raw)) { return new ArraySerializer<>(type); } if (Set.class.isAssignableFrom(raw)) { return new ArraySerializer<>(type); } if (PriorityQueue.class.isAssignableFrom(raw)) { return new ArraySerializer<>(type); } return super.findCollectionLikeSerializer(config, type, beanDesc, elementTypeSerializer, elementValueSerializer); }
/** * Same as {@link #getType(com.fasterxml.jackson.databind.type.SimpleType)} * * @param jacksonType * @return */ public Type getType(CollectionLikeType jacksonType) { // try { String signature = JacksonSignature.createSignature(jacksonType); JavaType contentType = jacksonType.getContentType(); String contentSignature = JacksonSignature.createSignature(contentType); Class<?> containerClass = jacksonType.getRawClass(); CollectionTypeJrapidoc type = new CollectionTypeJrapidoc(containerClass.getName(), signature, contentType.getRawClass().getName(), contentSignature); if (cache.containsKey(signature)) { return cache.get(signature); } cache.put(signature, type); getType(jacksonType.getContentType()); return type; }
@Override public JsonDeserializer<?> findCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException { Class<?> raw = type.getRawClass(); if (raw == CharSeq.class) { return new CharSeqDeserializer(type); } if (Seq.class.isAssignableFrom(raw)) { return new SeqDeserializer(type, settings.deserializeNullAsEmptyCollection()); } if (Set.class.isAssignableFrom(raw)) { return new SetDeserializer(type, settings.deserializeNullAsEmptyCollection()); } if (PriorityQueue.class.isAssignableFrom(raw)) { return new PriorityQueueDeserializer(type, settings.deserializeNullAsEmptyCollection()); } return super.findCollectionLikeDeserializer(type, config, beanDesc, elementTypeDeserializer, elementDeserializer); }