JsonParser,
to allow for simple overridability of basic parsing functionality.
The idea is that any functionality to be modified can be simply
overridden; and anything else will be delegated by default.
| Modifier and Type | Field and Description |
|---|---|
| protected JsonParser | delegate
Delegate object that method calls are delegated to. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | assignCurrentValue(Object v)
Implements abstract tools. Helper method, usually equivalent to:
|
| public boolean | canParseAsync()
Overrides tools. Method that can be called to determine if this parser instance uses non-blocking ("asynchronous") input access for decoding or not. |
| public boolean | canReadObjectId()
Overrides tools. Introspection method that may be called to see if the underlying data format supports some kind of Object Ids natively (many do not; for example, JSON doesn't). |
| public boolean | canReadTypeId()
Overrides tools. Introspection method that may be called to see if the underlying data format supports some kind of Type Ids natively (many do not; for example, JSON doesn't). |
| public void | clearCurrentToken()
Implements abstract tools. Method called to "consume" the current token by effectively
removing it so that |
| public void | close()
Implements abstract tools. Implements java. Closes the parser so that no further iteration or data access
can be made; will also close the underlying input source
if parser either owns the input source, or feature
|
| public TokenStreamLocation | currentLocation()
Implements abstract tools. Method that returns location of the last processed character; usually for error reporting purposes. |
| public String | currentName()
Implements abstract tools. Method that can be called to get the name associated with
the current token: for |
| public int | currentNameMatch(PropertyNameMatcher matcher)
Implements abstract tools. Method that verifies that the current token (see |
| public JsonToken | currentToken()
Implements abstract tools. Accessor to find which token parser currently points to, if any; null will be returned if none. |
| public long | currentTokenCount()
Implements abstract tools. Get an approximate count of the number of tokens that have been read. |
| public int | currentTokenId()
Implements abstract tools. Method similar to |
| public TokenStreamLocation | currentTokenLocation()
Implements abstract tools. Method that return the starting location of the current token; that is, position of the first character from input that starts the current token. |
| public Object | currentValue()
Implements abstract tools. Helper method, usually equivalent to:
Note that "current value" is NOT populated (or used) by Streaming parser; it is only used by higher-level data-binding functionality. |
| public JsonParser | Returns: Underlying parser calls are delegated toAccessor for getting the immediate |
| public void | finishToken()
Implements abstract tools. Method that may be used to force full handling of the current token so that even if lazy processing is enabled, the whole contents are read for possible retrieval. |
| public BigInteger | getBigIntegerValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public byte[] | getBinaryValue(Base64Variant b64variant)
Implements abstract tools. Method that can be used to read (and consume -- results may not be accessible using other methods after the call) base64-encoded binary data included in the current textual JSON value. |
| public boolean | getBooleanValue()
Implements abstract tools. Convenience accessor that can be called when the current
token is |
| public byte | getByteValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public BigDecimal | getDecimalValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public double | getDoubleValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public Object | getEmbeddedObject()
Implements abstract tools. Accessor that can be called if (and only if) the current token
is |
| public float | getFloatValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public int | getIntValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public JsonToken | getLastClearedToken()
Implements abstract tools. Method that can be called to get the last token that was
cleared using |
| public long | getLongValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public JsonParser. | getNumberType()
Implements abstract tools. If current token is of type
|
| public JsonParser. | getNumberTypeFP()
Implements abstract tools. If current token is of type
|
| public Number | getNumberValue()
Implements abstract tools. Generic number value accessor method that will work for all kinds of numeric values. |
| public Object | getNumberValueDeferred()
Implements abstract tools. Method similar to |
| public Number | getNumberValueExact()
Implements abstract tools. Method similar to |
| public Object | getObjectId()
Overrides tools. Method that can be called to check whether current token (one that was just read) has an associated Object id, and if so, return it. |
| public FormatSchema | getSchema()
Overrides tools. Method for accessing Schema that this parser uses, if any. |
| public short | getShortValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| public String | getString()
Implements abstract tools. Method for accessing textual representation of the current token;
if no current token (before first call to |
| public int | getString(Writer writer)
Implements abstract tools. Method to read the textual representation of the current token in chunks and pass it to the given Writer. |
| public char[] | getStringCharacters()
Implements abstract tools. Method similar to |
| public int | getStringLength()
Implements abstract tools. Accessor used with |
| public int | getStringOffset()
Implements abstract tools. Accessor used with |
| public Object | getTypeId()
Overrides tools. Method that can be called to check whether current token (one that was just read) has an associated type id, and if so, return it. |
| public boolean | getValueAsBoolean()
Overrides tools. Method that will try to convert value of current token to a boolean. |
| public boolean | getValueAsBoolean(boolean defaultValue)
Implements abstract tools. Method that will try to convert value of current token to a boolean. |
| public double | getValueAsDouble()
Overrides tools. Method that will try to convert value of current token to a Java double. |
| public double | getValueAsDouble(double defaultValue)
Overrides tools. Method that will try to convert value of current token to a Java double. |
| public int | getValueAsInt()
Overrides tools. Method that will try to convert value of current token to a
Java |
| public int | getValueAsInt(int defaultValue)
Overrides tools. Method that will try to convert value of current token to a
|
| public long | getValueAsLong()
Overrides tools. Method that will try to convert value of current token to a
|
| public long | getValueAsLong(long defaultValue)
Overrides tools. Method that will try to convert value of current token to a
|
| public String | getValueAsString()
Overrides tools. Method that will try to convert value of current token to a
|
| public String | getValueAsString(String defaultValue)
Implements abstract tools. Method that will try to convert value of current token to a
|
| public boolean | hasCurrentToken()
Implements abstract tools. Method for checking whether parser currently points to a token (and data for that token is available). |
| public boolean | hasStringCharacters()
Implements abstract tools. Method that can be used to determine whether calling of
|
| public boolean | hasToken(JsonToken t)
Implements abstract tools. Method that is functionally equivalent to:
|
| public boolean | hasTokenId(int id)
Implements abstract tools. Method that is functionally equivalent to:
|
| public boolean | isClosed()
Implements abstract tools. Method that can be called to determine whether this parser is closed or not. |
| public boolean | isEnabled(StreamReadFeature f)
Implements abstract tools. Method for checking whether specified |
| public boolean | isExpectedNumberIntToken()
Implements abstract tools. Similar to |
| public boolean | isExpectedStartArrayToken()
Implements abstract tools. Specialized accessor that can be used to verify that the current
token indicates start array (usually meaning that current token
is |
| public boolean | isExpectedStartObjectToken()
Implements abstract tools. Similar to |
| public boolean | isNaN()
Implements abstract tools. Accessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!). |
| public String | nextName()
Implements abstract tools. Method that fetches next token (as if calling |
| public boolean | nextName(SerializableString str)
Implements abstract tools. Method that fetches next token (as if calling |
| public int | nextNameMatch(PropertyNameMatcher matcher)
Implements abstract tools. Method that tries to match next token from stream as |
| public JsonToken | nextToken()
Implements abstract tools. Main iteration method, which will advance stream enough to determine type of the next token, if any. |
| public JsonToken | nextValue()
Implements abstract tools. Iteration method that will advance stream enough to determine type of the next token that is a value type (including JSON Array and Object start/end markers). |
| public NonBlockingInputFeeder | nonBlockingInputFeeder()
Overrides tools. Method that will either return a feeder instance (if parser uses
non-blocking, aka asynchronous access); or |
| public ObjectReadContext | objectReadContext()
Implements abstract tools. Accessor for context object provided by higher level data-binding functionality (or, in some cases, simple placeholder of the same) that allows some level of interaction including ability to trigger deserialization of Object values through generator instance. |
| public int | readBinaryValue(Base64Variant b64variant, OutputStream out)
Overrides tools. Similar to |
| public <T> T | readValueAs(Class<T> valueType)
Implements abstract tools. Method to deserialize stream content into a non-container
type (it can be an array type, however): typically a bean, array
or a wrapper type (like Note method can only be called if the parser has
been constructed with a linkage to
|
| public <T> T | readValueAs(TypeReference<T> valueTypeRef)
Implements abstract tools. Method to deserialize stream content into a Java type, reference to which is passed as argument. |
| public <T> T | |
| public <T extends TreeNode> T | readValueAsTree()
Implements abstract tools. Method to deserialize stream content into equivalent "tree model",
represented by root |
| public JsonParser | skipChildren()
Implements abstract tools. Method that will skip all child tokens of an array or
object token that the parser currently points to,
iff stream points to
|
| public JacksonFeatureSet | streamReadCapabilities()
Implements abstract tools. Accessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly). |
| public StreamReadConstraints | streamReadConstraints()
Implements abstract tools. Get the constraints to apply when performing streaming reads. |
| public TokenStreamContext | streamReadContext()
Implements abstract tools. Method that can be used to access current parsing context reader is in. There are 3 different types: root, array and object contexts, with slightly different available information. |
| public int | streamReadFeatures()
Implements abstract tools. Bulk access method for getting state of all standard |
| public Object | streamReadInputSource()
Implements abstract tools. Method that can be used to get access to object that is used
to access input being parsed; this is usually either
|
| public Version | version()
Implements abstract tools. Implements tools. Accessor for getting version of the core package, given a parser instance. |