Package com.fasterxml.jackson.jr.ob.impl
Class AnyReader
- java.lang.Object
-
- com.fasterxml.jackson.jr.ob.api.ValueReader
-
- com.fasterxml.jackson.jr.ob.impl.AnyReader
-
public class AnyReader extends ValueReader
ValueReader
used for "untyped" values; ones that are bound to whateverObject
is the natural mapping to JSON value that parser currently points to
-
-
Field Summary
Fields Modifier and Type Field Description static AnyReader
std
-
Fields inherited from class com.fasterxml.jackson.jr.ob.api.ValueReader
_valueType
-
-
Constructor Summary
Constructors Constructor Description AnyReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
fromBoolean(boolean b)
Method called to let implementation change aBoolean
value that has been read from input.protected java.lang.Object
fromEmbedded(java.lang.Object value)
protected java.lang.String
fromKey(java.lang.String key)
Method called to let implementation change a key of an Object field after being parsed from input.protected java.lang.Object
fromNull()
Method called to let implementation change a null value that has been read from input.protected java.lang.Object
fromString(java.lang.String str)
Method called to let implementation change aString
value that has been read from input.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[]
readArrayFromArray(JSONReader r, com.fasterxml.jackson.core.JsonParser p, CollectionBuilder b)
java.util.Collection<java.lang.Object>
readCollectionFromArray(JSONReader r, com.fasterxml.jackson.core.JsonParser p, CollectionBuilder b)
java.util.Map<java.lang.String,java.lang.Object>
readFromObject(JSONReader r, com.fasterxml.jackson.core.JsonParser p, MapBuilder b)
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
-
std
public static final AnyReader std
-
-
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
-
readFromObject
public java.util.Map<java.lang.String,java.lang.Object> readFromObject(JSONReader r, com.fasterxml.jackson.core.JsonParser p, MapBuilder b) throws java.io.IOException
- Throws:
java.io.IOException
-
readArrayFromArray
public java.lang.Object[] readArrayFromArray(JSONReader r, com.fasterxml.jackson.core.JsonParser p, CollectionBuilder b) throws java.io.IOException
- Throws:
java.io.IOException
-
readCollectionFromArray
public java.util.Collection<java.lang.Object> readCollectionFromArray(JSONReader r, com.fasterxml.jackson.core.JsonParser p, CollectionBuilder b) throws java.io.IOException
- Throws:
java.io.IOException
-
fromNull
protected java.lang.Object fromNull() throws java.io.IOException
Method called to let implementation change a null value that has been read from input. Default implementation returns null as is.- Throws:
java.io.IOException
-
fromBoolean
protected java.lang.Object fromBoolean(boolean b) throws java.io.IOException
Method called to let implementation change aBoolean
value that has been read from input. Default implementation returns Boolean value as is.- Throws:
java.io.IOException
-
fromKey
protected java.lang.String fromKey(java.lang.String key) throws java.io.IOException
Method called to let implementation change a key of an Object field after being parsed from input. Default implementation returns key as is.- Throws:
java.io.IOException
-
fromString
protected java.lang.Object fromString(java.lang.String str) throws java.io.IOException
Method called to let implementation change aString
value that has been read from input. Default implementation returns String value as is.- Throws:
java.io.IOException
-
fromEmbedded
protected java.lang.Object fromEmbedded(java.lang.Object value) throws java.io.IOException
- Throws:
java.io.IOException
-
-