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
ValueReaderused for "untyped" values; ones that are bound to whateverObjectis the natural mapping to JSON value that parser currently points to
-
-
Field Summary
Fields Modifier and Type Field Description static AnyReaderstd-
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.ObjectfromBoolean(boolean b)Method called to let implementation change aBooleanvalue that has been read from input.protected java.lang.ObjectfromEmbedded(java.lang.Object value)protected java.lang.ObjectfromKey(java.lang.String key)Method called to let implementation change a key of an Object field after being parsed from input.protected java.lang.ObjectfromNull()Method called to let implementation change a null value that has been read from input.protected java.lang.ObjectfromString(java.lang.String str)Method called to let implementation change aStringvalue that has been read from input.java.lang.Objectread(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.Object,java.lang.Object>readFromObject(JSONReader r, com.fasterxml.jackson.core.JsonParser p, MapBuilder b)java.lang.ObjectreadNext(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:ValueReaderMethod 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:
readNextin 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:ValueReaderMethod 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:
readin 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.Object,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.IOExceptionMethod 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.IOExceptionMethod called to let implementation change aBooleanvalue that has been read from input. Default implementation returns Boolean value as is.- Throws:
java.io.IOException
-
fromKey
protected java.lang.Object fromKey(java.lang.String key) throws java.io.IOExceptionMethod 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.IOExceptionMethod called to let implementation change aStringvalue 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
-
-