|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.JsonDeserializer<T>
org.codehaus.jackson.map.deser.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 classes/interfaces inherited from class org.codehaus.jackson.map.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)
|
Method Summary | |
---|---|
protected boolean |
_parseBoolean(JsonParser jp,
DeserializationContext ctxt)
|
protected Date |
_parseDate(JsonParser jp,
DeserializationContext ctxt)
|
protected double |
_parseDouble(JsonParser jp,
DeserializationContext ctxt)
|
protected float |
_parseFloat(JsonParser jp,
DeserializationContext ctxt)
|
protected int |
_parseInt(JsonParser jp,
DeserializationContext ctxt)
|
protected long |
_parseLong(JsonParser jp,
DeserializationContext ctxt)
|
protected short |
_parseShort(JsonParser jp,
DeserializationContext ctxt)
|
Object |
deserializeWithType(JsonParser jp,
DeserializationContext ctxt,
TypeDeserializer typeDeserializer)
Base implementation that does not assume specific type inclusion mechanism. |
protected JsonDeserializer<Object> |
findDeserializer(DeserializationConfig config,
DeserializerProvider provider,
JavaType type,
String propertyName,
Map<JavaType,JsonDeserializer<Object>> seen)
Helper method used to locate deserializers for properties the bean itself contains. |
Class<?> |
getValueClass()
|
JavaType |
getValueType()
Exact structured type deserializer handles, if known; null for non-structured (scalar) types. |
protected void |
handleUnknownProperty(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 void |
reportUnknownProperty(DeserializationContext ctxt,
Object instanceOrClass,
String fieldName)
|
Methods inherited from class org.codehaus.jackson.map.JsonDeserializer |
---|
deserialize, deserialize, getNullValue |
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)
Method Detail |
---|
public Class<?> getValueClass()
public JavaType getValueType()
Default implementation just returns null.
public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, JsonProcessingException
deserializeWithType
in class JsonDeserializer<T>
typeDeserializer
- Deserializer to use for handling type information
IOException
JsonProcessingException
protected final boolean _parseBoolean(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected final short _parseShort(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected final int _parseInt(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected final long _parseLong(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected final float _parseFloat(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected final double _parseDouble(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected Date _parseDate(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
protected JsonDeserializer<Object> findDeserializer(DeserializationConfig config, DeserializerProvider provider, JavaType type, String propertyName, Map<JavaType,JsonDeserializer<Object>> seen) throws JsonMappingException
type
- Type of property to deserialize
JsonMappingException
protected void handleUnknownProperty(JsonParser jp, DeserializationContext ctxt, Object instanceOrClass, String propName) throws IOException, 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
JsonProcessingException
protected void reportUnknownProperty(DeserializationContext ctxt, Object instanceOrClass, String fieldName) throws IOException, JsonProcessingException
IOException
JsonProcessingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |