public class RangeDeserializer
extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<com.google.common.collect.Range<?>>
implements com.fasterxml.jackson.databind.deser.ContextualDeserializer
Range
.
TODO: I think it would make sense to reimplement this deserializer to
use Delegating Deserializer, using a POJO as an intermediate form (properties
could be of type Object
)
This would also also simplify the implementation a bit.
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.BoundType |
_defaultBoundType |
protected com.fasterxml.jackson.databind.JsonDeserializer<java.lang.Object> |
_endpointDeserializer |
protected com.fasterxml.jackson.databind.JavaType |
_rangeType |
private static long |
serialVersionUID |
Constructor and Description |
---|
RangeDeserializer(com.google.common.collect.BoundType defaultBoundType,
com.fasterxml.jackson.databind.JavaType rangeType) |
RangeDeserializer(com.fasterxml.jackson.databind.JavaType rangeType)
Deprecated.
Since 2.7
|
RangeDeserializer(com.fasterxml.jackson.databind.JavaType rangeType,
com.fasterxml.jackson.databind.JsonDeserializer<?> endpointDeser) |
RangeDeserializer(com.fasterxml.jackson.databind.JavaType rangeType,
com.fasterxml.jackson.databind.JsonDeserializer<?> endpointDeser,
com.google.common.collect.BoundType defaultBoundType) |
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonDeserializer<?> |
createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt,
com.fasterxml.jackson.databind.BeanProperty property) |
com.google.common.collect.Range<?> |
deserialize(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext context) |
private com.google.common.collect.BoundType |
deserializeBoundType(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonParser p) |
private java.lang.Comparable<?> |
deserializeEndpoint(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonParser p) |
java.lang.Object |
deserializeWithType(com.fasterxml.jackson.core.JsonParser jp,
com.fasterxml.jackson.databind.DeserializationContext ctxt,
com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) |
private void |
expect(com.fasterxml.jackson.databind.DeserializationContext context,
com.fasterxml.jackson.core.JsonToken expected,
com.fasterxml.jackson.core.JsonToken actual) |
com.fasterxml.jackson.databind.JavaType |
getValueType() |
_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
deserialize, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
private static final long serialVersionUID
protected final com.fasterxml.jackson.databind.JavaType _rangeType
protected final com.fasterxml.jackson.databind.JsonDeserializer<java.lang.Object> _endpointDeserializer
private com.google.common.collect.BoundType _defaultBoundType
@Deprecated public RangeDeserializer(com.fasterxml.jackson.databind.JavaType rangeType)
public RangeDeserializer(com.google.common.collect.BoundType defaultBoundType, com.fasterxml.jackson.databind.JavaType rangeType)
public RangeDeserializer(com.fasterxml.jackson.databind.JavaType rangeType, com.fasterxml.jackson.databind.JsonDeserializer<?> endpointDeser)
public RangeDeserializer(com.fasterxml.jackson.databind.JavaType rangeType, com.fasterxml.jackson.databind.JsonDeserializer<?> endpointDeser, com.google.common.collect.BoundType defaultBoundType)
public com.fasterxml.jackson.databind.JavaType getValueType()
getValueType
in class com.fasterxml.jackson.databind.deser.std.StdDeserializer<com.google.common.collect.Range<?>>
public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
createContextual
in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
com.fasterxml.jackson.databind.JsonMappingException
public java.lang.Object deserializeWithType(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) throws java.io.IOException
deserializeWithType
in class com.fasterxml.jackson.databind.deser.std.StdDeserializer<com.google.common.collect.Range<?>>
java.io.IOException
public com.google.common.collect.Range<?> deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext context) throws java.io.IOException
deserialize
in class com.fasterxml.jackson.databind.JsonDeserializer<com.google.common.collect.Range<?>>
java.io.IOException
private com.google.common.collect.BoundType deserializeBoundType(com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.core.JsonParser p) throws java.io.IOException
java.io.IOException
private java.lang.Comparable<?> deserializeEndpoint(com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.core.JsonParser p) throws java.io.IOException
java.io.IOException
private void expect(com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.core.JsonToken expected, com.fasterxml.jackson.core.JsonToken actual) throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException