Class JsonUnwrappedDeserializer<T>
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonDeserializer<T>
-
- io.fabric8.kubernetes.model.jackson.JsonUnwrappedDeserializer<T>
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.ContextualDeserializer,com.fasterxml.jackson.databind.deser.NullValueProvider
public class JsonUnwrappedDeserializer<T> extends com.fasterxml.jackson.databind.JsonDeserializer<T> implements com.fasterxml.jackson.databind.deser.ContextualDeserializerDesc: 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
-
-
Constructor Summary
Constructors Constructor Description JsonUnwrappedDeserializer()JsonUnwrappedDeserializer(com.fasterxml.jackson.databind.DeserializationContext deserializationContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonDeserializer<?>createContextual(com.fasterxml.jackson.databind.DeserializationContext deserializationContext, com.fasterxml.jackson.databind.BeanProperty beanProperty)Tdeserialize(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.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(com.fasterxml.jackson.databind.DeserializationContext deserializationContext) throws com.fasterxml.jackson.databind.JsonMappingException- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-
-
Method Detail
-
createContextual
public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext deserializationContext, com.fasterxml.jackson.databind.BeanProperty beanProperty) throws com.fasterxml.jackson.databind.JsonMappingException- Specified by:
createContextualin interfacecom.fasterxml.jackson.databind.deser.ContextualDeserializer- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-
deserialize
public T deserialize(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext deserializationContext) throws IOException
- Specified by:
deserializein classcom.fasterxml.jackson.databind.JsonDeserializer<T>- Throws:
IOException
-
-