Class EnumIntDeserializer<E extends Enum<E>>
java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<E>
si.mazi.rescu.serialization.jackson.serializers.EnumIntDeserializer<E>
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
- Direct Known Subclasses:
EnumIntDeserializerOneBased
public abstract class EnumIntDeserializer<E extends Enum<E>>
extends com.fasterxml.jackson.databind.JsonDeserializer<E>
- Author:
- Matija Mazi 0-based enum deserializer. This wil deserialize 0 as the first enum constant, 1 as the second etc.
-
Nested Class Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedEnumIntDeserializer(Class<E> enumClass) -
Method Summary
Modifier and Type Method Description Edeserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt)protected intgetIndexBase()Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, deserializeWithType, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
Constructor Details
-
Method Details
-
deserialize
public E deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException- Specified by:
deserializein classcom.fasterxml.jackson.databind.JsonDeserializer<E extends Enum<E>>- Throws:
IOExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
getIndexBase
protected int getIndexBase()
-