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
ValueReader used for "untyped" values; ones that are bound
to whatever Object is the natural mapping to JSON
value that parser currently points to-
Field Summary
FieldsFields inherited from class com.fasterxml.jackson.jr.ob.api.ValueReader
_valueType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectfromBoolean(boolean b) Method called to let implementation change aBooleanvalue that has been read from input.protected ObjectfromEmbedded(Object value) protected StringMethod called to let implementation change a key of an Object field after being parsed from input.protected ObjectfromNull()Method called to let implementation change a null value that has been read from input.protected ObjectfromString(String str) Method called to let implementation change aStringvalue that has been read from input.read(JSONReader r, com.fasterxml.jackson.core.JsonParser p) Method called to deserialize value of type supported by this reader, using given parser.Object[]readArrayFromArray(JSONReader r, com.fasterxml.jackson.core.JsonParser p, CollectionBuilder b) readCollectionFromArray(JSONReader r, com.fasterxml.jackson.core.JsonParser p, CollectionBuilder b) readFromObject(JSONReader r, com.fasterxml.jackson.core.JsonParser p, MapBuilder b) 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, _valueTypeDesc, valueType
-
Field Details
-
std
-
-
Constructor Details
-
AnyReader
public AnyReader()
-
-
Method Details
-
readNext
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 accessors 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:
IOException
-
read
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:
IOException
-
readFromObject
public Map<String,Object> readFromObject(JSONReader r, com.fasterxml.jackson.core.JsonParser p, MapBuilder b) throws IOException - Throws:
IOException
-
readArrayFromArray
public Object[] readArrayFromArray(JSONReader r, com.fasterxml.jackson.core.JsonParser p, CollectionBuilder b) throws IOException - Throws:
IOException
-
readCollectionFromArray
public Collection<Object> readCollectionFromArray(JSONReader r, com.fasterxml.jackson.core.JsonParser p, CollectionBuilder b) throws IOException - Throws:
IOException
-
fromNull
Method called to let implementation change a null value that has been read from input. Default implementation returns null as is.- Throws:
IOException
-
fromBoolean
Method called to let implementation change aBooleanvalue that has been read from input. Default implementation returns Boolean value as is.- Throws:
IOException
-
fromKey
Method called to let implementation change a key of an Object field after being parsed from input. Default implementation returns key as is.- Throws:
IOException
-
fromString
Method called to let implementation change aStringvalue that has been read from input. Default implementation returns String value as is.- Throws:
IOException
-
fromEmbedded
- Throws:
IOException
-