Class JsonUnwrappedDeserializer<T>
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonDeserializer<T>
-
- io.fabric8.kubernetes.model.jackson.JsonUnwrappedDeserializer<T>
-
- All Implemented Interfaces:
ContextualDeserializer,NullValueProvider
public class JsonUnwrappedDeserializer<T> extends JsonDeserializer<T> implements ContextualDeserializer
Desc: this is a workaround on the problem that Jackson's @JsonUnwrapped doesn't work with polymorphism (@JsonTypeInfo) Adapted from https://stackoverflow.com/questions/37423848/deserializing-polymorphic-types-with-jsonunwrapped-using-jackson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
JsonDeserializer.None
-
-
Constructor Summary
Constructors Constructor Description JsonUnwrappedDeserializer()JsonUnwrappedDeserializer(DeserializationContext deserializationContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonDeserializer<?>createContextual(DeserializationContext deserializationContext, BeanProperty beanProperty)Tdeserialize(JsonParser jsonParser, DeserializationContext deserializationContext)-
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
-
-
-
Constructor Detail
-
JsonUnwrappedDeserializer
public JsonUnwrappedDeserializer()
-
JsonUnwrappedDeserializer
public JsonUnwrappedDeserializer(DeserializationContext deserializationContext) throws JsonMappingException
- Throws:
JsonMappingException
-
-
Method Detail
-
createContextual
public JsonDeserializer<?> createContextual(DeserializationContext deserializationContext, BeanProperty beanProperty) throws JsonMappingException
- Specified by:
createContextualin interfaceContextualDeserializer- Throws:
JsonMappingException
-
deserialize
public T deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException
- Specified by:
deserializein classJsonDeserializer<T>- Throws:
IOException
-
-