|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.JsonDeserializer<T> com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
public abstract class StdDeserializer<T>
Base class for common deserializers. Contains shared base functionality for dealing with primitive values, such as (re)parsing from String.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer |
---|
JsonDeserializer.None |
Field Summary | |
---|---|
protected Class<?> |
_valueClass
Type of values this deserializer handles: sometimes exact types, other time most specific supertype of types deserializer handles (which may be as generic as Object in some case) |
Constructor Summary | |
---|---|
protected |
StdDeserializer(Class<?> vc)
|
protected |
StdDeserializer(JavaType valueType)
|
Method Summary | |
---|---|
protected Boolean |
_parseBoolean(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected boolean |
_parseBooleanFromNumber(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected boolean |
_parseBooleanPrimitive(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected Byte |
_parseByte(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected Date |
_parseDate(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected Double |
_parseDouble(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected double |
_parseDoublePrimitive(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected Float |
_parseFloat(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected float |
_parseFloatPrimitive(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected Integer |
_parseInteger(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected int |
_parseIntPrimitive(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected Long |
_parseLong(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected long |
_parseLongPrimitive(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected Short |
_parseShort(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
protected short |
_parseShortPrimitive(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt)
|
Object |
deserializeWithType(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt,
TypeDeserializer typeDeserializer)
Base implementation that does not assume specific type inclusion mechanism. |
protected JsonDeserializer<Object> |
findDeserializer(DeserializationContext ctxt,
JavaType type,
BeanProperty property)
Helper method used to locate deserializers for properties the type this deserializer handles contains (usually for properties of bean types) |
Class<?> |
getValueClass()
|
JavaType |
getValueType()
Exact structured type deserializer handles, if known. |
protected void |
handleUnknownProperty(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt,
Object instanceOrClass,
String propName)
Method called to deal with a property that did not map to a known Bean property. |
protected boolean |
isDefaultDeserializer(JsonDeserializer<?> deserializer)
Method that can be called to determine if given deserializer is the default deserializer Jackson uses; as opposed to a custom deserializer installed by a module or calling application. |
protected boolean |
isDefaultKeyDeserializer(KeyDeserializer keyDeser)
|
protected static double |
parseDouble(String numStr)
Helper method for encapsulating calls to low-level double value parsing; single place just because we need a work-around that must be applied to all calls. |
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer |
---|
deserialize, deserialize, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, unwrappingDeserializer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Class<?> _valueClass
Object
in some case)
Constructor Detail |
---|
protected StdDeserializer(Class<?> vc)
protected StdDeserializer(JavaType valueType)
Method Detail |
---|
public Class<?> getValueClass()
public JavaType getValueType()
Default implementation just returns null.
protected boolean isDefaultDeserializer(JsonDeserializer<?> deserializer)
JacksonStdImpl
annotation on deserializer class.
protected boolean isDefaultKeyDeserializer(KeyDeserializer keyDeser)
public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
deserializeWithType
in class JsonDeserializer<T>
typeDeserializer
- Deserializer to use for handling type information
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final boolean _parseBooleanPrimitive(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final Boolean _parseBoolean(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final boolean _parseBooleanFromNumber(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected Byte _parseByte(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected Short _parseShort(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final short _parseShortPrimitive(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final int _parseIntPrimitive(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final Integer _parseInteger(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final Long _parseLong(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final long _parseLongPrimitive(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final Float _parseFloat(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final float _parseFloatPrimitive(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final Double _parseDouble(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected final double _parseDoublePrimitive(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected Date _parseDate(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOException
com.fasterxml.jackson.core.JsonProcessingException
protected static final double parseDouble(String numStr) throws NumberFormatException
NumberFormatException
protected JsonDeserializer<Object> findDeserializer(DeserializationContext ctxt, JavaType type, BeanProperty property) throws JsonMappingException
type
- Type of property to deserializeproperty
- Actual property object (field, method, constuctor parameter) used
for passing deserialized values; provided so deserializer can be contextualized if necessary (since 1.7)
JsonMappingException
protected void handleUnknownProperty(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, Object instanceOrClass, String propName) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
NOTE: method signature was changed in version 1.5; explicit JsonParser must be passed since it may be something other than what context has. Prior versions did not include the first parameter.
jp
- Parser that points to value of the unknown propertyctxt
- Context for deserialization; allows access to the parser,
error reporting functionalityinstanceOrClass
- Instance that is being populated by this
deserializer, or if not known, Class that would be instantiated.
If null, will assume type is what getValueClass()
returns.propName
- Name of the property that can not be mapped
IOException
com.fasterxml.jackson.core.JsonProcessingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |