Package com.fasterxml.jackson.jr.ob.impl
Class MapReader
- java.lang.Object
-
- com.fasterxml.jackson.jr.ob.api.ValueReader
-
- com.fasterxml.jackson.jr.ob.impl.MapReader
-
public class MapReader extends ValueReader
Reader for typedMap
values.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<?>
_mapType
protected ValueReader
_valueReader
-
Fields inherited from class com.fasterxml.jackson.jr.ob.api.ValueReader
_valueType
-
-
Constructor Summary
Constructors Constructor Description MapReader(java.lang.Class<?> mapType, ValueReader vr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JSONObjectException
_reportProblem(com.fasterxml.jackson.core.JsonParser p)
java.lang.Object
read(JSONReader r, com.fasterxml.jackson.core.JsonParser p)
Method called to deserialize value of type supported by this reader, using given parser.java.lang.Object
readNext(JSONReader r, com.fasterxml.jackson.core.JsonParser p)
Method called to deserialize value of type supported by this reader, using given parser.-
Methods inherited from class com.fasterxml.jackson.jr.ob.api.ValueReader
_tokenDesc, _tokenDesc, valueType
-
-
-
-
Field Detail
-
_mapType
protected final java.lang.Class<?> _mapType
-
_valueReader
protected final ValueReader _valueReader
-
-
Constructor Detail
-
MapReader
public MapReader(java.lang.Class<?> mapType, ValueReader vr)
-
-
Method Detail
-
readNext
public java.lang.Object readNext(JSONReader r, com.fasterxml.jackson.core.JsonParser p) throws java.io.IOException
Description copied from class:ValueReader
Method called to deserialize value of type supported by this reader, using given parser. Parser is not yet positioned to the (first) token of the value to read and needs to be advanced.Default implementation simply calls `p.nextToken()` first, then calls {#link
ValueReader.read(JSONReader, JsonParser)
, but some implementations may decide to implement this differently to use (slightly) more efficient accessor inJsonParser
, likeJsonParser.nextIntValue(int)
.- Overrides:
readNext
in classValueReader
- Parameters:
r
- Context object that allows calling other read methods for contained values of different types (for example for collection readers).p
- Underlying parser used for reading decoded token stream- Throws:
java.io.IOException
-
read
public java.lang.Object read(JSONReader r, com.fasterxml.jackson.core.JsonParser p) throws java.io.IOException
Description copied from class:ValueReader
Method called to deserialize value of type supported by this reader, using given parser. Parser is already positioned to the (first) token of the value to read.- Specified by:
read
in classValueReader
- Parameters:
r
- Context object that allows calling other read methods for contained values of different types (for example for collection readers).p
- Underlying parser used for reading decoded token stream- Throws:
java.io.IOException
-
_reportProblem
protected JSONObjectException _reportProblem(com.fasterxml.jackson.core.JsonParser p)
-
-