public class AnyReader extends ValueReader
ValueReader used for "untyped" values; ones that are bound
to whatever Object is the natural mapping to JSON
value that parser currently points to| Modifier and Type | Field and Description |
|---|---|
static AnyReader |
std |
_valueType| Constructor and Description |
|---|
AnyReader() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
fromBoolean(boolean b)
Method called to let implementation change a
Boolean value that has been
read from input. |
protected Object |
fromEmbedded(Object value) |
protected String |
fromKey(String key)
Method called to let implementation change a key of an Object field
after being parsed from input.
|
protected Object |
fromNull()
Method called to let implementation change a null value that has been
read from input.
|
protected Object |
fromString(String str)
Method called to let implementation change a
String value that has been
read from input. |
Object |
read(JSONReader r,
JsonParser p)
Method called to deserialize value of type supported by this reader, using
given parser.
|
Object[] |
readArrayFromArray(JSONReader r,
JsonParser p,
CollectionBuilder b) |
Collection<Object> |
readCollectionFromArray(JSONReader r,
JsonParser p,
CollectionBuilder b) |
Map<String,Object> |
readFromObject(JSONReader r,
JsonParser p,
MapBuilder b) |
Object |
readNext(JSONReader r,
JsonParser p)
Method called to deserialize value of type supported by this reader, using
given parser.
|
_tokenDesc, _tokenDesc, _valueTypeDesc, valueTypepublic static final AnyReader std
public Object readNext(JSONReader r, JsonParser p) throws IOException
ValueReader
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 in JsonParser, like JsonParser.nextIntValue(int).
readNext in class ValueReaderr - 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 streamIOExceptionpublic Object read(JSONReader r, JsonParser p) throws IOException
ValueReaderread in class ValueReaderr - 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 streamIOExceptionpublic Map<String,Object> readFromObject(JSONReader r, JsonParser p, MapBuilder b) throws IOException
IOExceptionpublic Object[] readArrayFromArray(JSONReader r, JsonParser p, CollectionBuilder b) throws IOException
IOExceptionpublic Collection<Object> readCollectionFromArray(JSONReader r, JsonParser p, CollectionBuilder b) throws IOException
IOExceptionprotected Object fromNull() throws IOException
IOExceptionprotected Object fromBoolean(boolean b) throws IOException
Boolean value that has been
read from input.
Default implementation returns Boolean value as is.IOExceptionprotected String fromKey(String key) throws IOException
IOExceptionprotected Object fromString(String str) throws IOException
String value that has been
read from input.
Default implementation returns String value as is.IOExceptionprotected Object fromEmbedded(Object value) throws IOException
IOExceptionCopyright © 2025 FasterXML. All rights reserved.