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
Current value to assign for the current input context of this parser v)Overrides com. Helper method, usually equivalent to:
|
| public boolean | canParseAsync()
Overrides com. 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 com. 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 com. 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 boolean | canUseSchema(FormatSchema
Schema to check schema)Overrides com. Method that can be used to verify that given schema can be used with
this parser (using |
| public void | clearCurrentToken()
Implements abstract com. Method called to "consume" the current token by effectively
removing it so that |
| public void | close()
Implements abstract com. 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 JsonLocation | currentLocation()
Overrides com. Method that returns location of the last processed input unit (character or byte) from the input; usually for error reporting purposes. |
| public String | currentName()
Overrides com. Method that can be called to get the name associated with
the current token: for |
| public JsonToken | currentToken()
Overrides com. Accessor to find which token parser currently points to, if any; null will be returned if none. |
| public long | currentTokenCount()
Overrides com. Get an approximate count of the number of tokens that have been read. |
| public int | currentTokenId()
Overrides com. Method similar to |
| public JsonLocation | currentTokenLocation()
Overrides com. Method that return the starting location of the current (most recently returned) token; that is, the position of the first input unit (character or byte) from input that starts the current token. |
| public Object | currentValue()
Overrides com. 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 JsonParser | disable(JsonParser.
Feature to disable fOverrides com. Method for disabling specified feature
(check |
| public JsonParser | enable(JsonParser.
Feature to enable fOverrides com. Method for enabling specified parser feature
(check |
| public void | finishToken()
Overrides com. 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 com. Numeric accessor that can be called when the current
token is of type |
| public byte[] | getBinaryValue(Base64Variant
Expected variant of base64 encoded
content (see b64variant)Base64Variants for definitions
of "standard" variants).Implements abstract com. 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()
Overrides com. Convenience accessor that can be called when the current
token is |
| public byte | getByteValue()
Overrides com. Numeric accessor that can be called when the current
token is of type |
| public ObjectCodec | getCodec()
Implements abstract com. Accessor for |
| public JsonLocation | getCurrentLocation()
Implements abstract com.
Deprecated
Deprecated alias for |
| public String | getCurrentName()
Implements abstract com.
Deprecated
Deprecated alias of |
| public JsonToken | getCurrentToken()
Implements abstract com.
Deprecated
Alias for |
| public int | getCurrentTokenId()
Implements abstract com.
Deprecated
Deprecated alias for |
| public Object | getCurrentValue()
Overrides com.
Deprecated
Deprecated alias for |
| public BigDecimal | getDecimalValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public double | getDoubleValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public Object | getEmbeddedObject()
Overrides com. Accessor that can be called if (and only if) the current token
is |
| public int | getFeatureMask()
Overrides com. Bulk access method for getting state of all standard |
| public float | getFloatValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public Object | getInputSource()
Overrides com. Method that can be used to get access to object that is used
to access input being parsed; this is usually either
|
| public int | getIntValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public JsonToken | getLastClearedToken()
Implements abstract com. Method that can be called to get the last token that was
cleared using |
| public long | getLongValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public NonBlockingInputFeeder | getNonBlockingInputFeeder()
Overrides com. Method that will either return a feeder instance (if parser uses
non-blocking, aka asynchronous access); or |
| public JsonParser. | getNumberType()
Implements abstract com. If current token is of type
|
| public JsonParser. | getNumberTypeFP()
Overrides com. If current token is of type
|
| public Number | getNumberValue()
Implements abstract com. Generic number value accessor method that will work for all kinds of numeric values. |
| public Object | getNumberValueDeferred()
Overrides com. Method similar to |
| public Number | getNumberValueExact()
Overrides com. Method similar to |
| public Object | getObjectId()
Overrides com. 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 JsonStreamContext | getParsingContext()
Implements abstract com. 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 JacksonFeatureSet | getReadCapabilities()
Overrides com. Accessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly). |
| public FormatSchema | getSchema()
Overrides com. Method for accessing Schema that this parser uses, if any. |
| public short | getShortValue()
Overrides com. Numeric accessor that can be called when the current
token is of type |
| public String | getText()
Implements abstract com. Method for accessing textual representation of the current token;
if no current token (before first call to |
| public int | getText(Writer
Writer to write textual content to writer)Overrides com. Method to read the textual representation of the current token in chunks and pass it to the given Writer. |
| public char[] | getTextCharacters()
Implements abstract com. Method similar to |
| public int | getTextLength()
Implements abstract com. Accessor used with |
| public int | getTextOffset()
Implements abstract com. Accessor used with |
| public JsonLocation | getTokenLocation()
Implements abstract com.
Deprecated
Deprecated alias for |
| public Object | getTypeId()
Overrides com. 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 com. Method that will try to convert value of current token to a boolean. |
| public boolean | getValueAsBoolean(boolean
Default value to return if conversion to defaultValue)boolean is not possibleOverrides com. Method that will try to convert value of current token to a boolean. |
| public double | getValueAsDouble()
Overrides com. Method that will try to convert value of current token to a Java double. |
| public double | getValueAsDouble(double
Default value to return if conversion to defaultValue)double is not possibleOverrides com. Method that will try to convert value of current token to a Java double. |
| public int | getValueAsInt()
Overrides com. Method that will try to convert value of current token to a
Java |
| public int | getValueAsInt(int
Default value to return if conversion to defaultValue)int is not possibleOverrides com. Method that will try to convert value of current token to a int. |
| public long | getValueAsLong()
Overrides com. Method that will try to convert value of current token to a long. |
| public long | getValueAsLong(long
Default value to return if conversion to defaultValue)long is not possibleOverrides com. Method that will try to convert value of current token to a long. |
| public String | getValueAsString()
Overrides com. Method that will try to convert value of current token to a
|
| public String | getValueAsString(String
Default value to return if conversion to defaultValue)String is not possibleImplements abstract com. Method that will try to convert value of current token to a
|
| public boolean | hasCurrentToken()
Implements abstract com. Method for checking whether parser currently points to a token (and data for that token is available). |
| public boolean | hasTextCharacters()
Implements abstract com. Method that can be used to determine whether calling of
|
| public boolean | hasToken(JsonToken
Token to match t)Implements abstract com. Method that is functionally equivalent to:
|
| public boolean | hasTokenId(int
Token id to match (from (@link JsonTokenId}) id)Implements abstract com. Method that is functionally equivalent to:
|
| public boolean | isClosed()
Implements abstract com. Method that can be called to determine whether this parser is closed or not. |
| public boolean | isEnabled(JsonParser.
Feature to check fOverrides com. Method for checking whether specified |
| public boolean | isExpectedNumberIntToken()
Overrides com. Similar to |
| public boolean | isExpectedStartArrayToken()
Overrides com. Specialized accessor that can be used to verify that the current
token indicates start array (usually meaning that current token
is |
| public boolean | isExpectedStartObjectToken()
Overrides com. Similar to |
| public boolean | isNaN()
Overrides com. Accessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!). |
| public JsonToken | nextToken()
Implements abstract com. Main iteration method, which will advance stream enough to determine type of the next token, if any. |
| public JsonToken | nextValue()
Implements abstract com. 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 void | overrideCurrentName(String
Name to use as the current name; may be null. name)Implements abstract com. Method that can be used to change what is considered to be the current (field) name. |
| public JsonParser | overrideFormatFeatures(int
Bit mask of set/clear state for features to change values, int Bit mask of features to change mask)Overrides com. Bulk set method for (re)setting states of |
| public JsonParser | overrideStdFeatures(int
Bit mask of set/clear state for features to change values, int Bit mask of features to change mask)Overrides com. Bulk set method for (re)setting states of features specified by |
| public int | readBinaryValue(Base64Variant
base64 variant to use b64variant, OutputStream Output stream to use for passing decoded binary data out)Overrides com. Similar to |
| public boolean | requiresCustomCodec()
Overrides com. Method that can be called to determine if a custom
|
| public void | setCodec(ObjectCodec
Codec to assign, if any; c)null if noneImplements abstract com. Setter that allows defining |
| public void | setCurrentValue(Object
Current value to assign for the current input context of this parser v)Overrides com.
Deprecated
Deprecated alias for |
| public JsonParser | setFeatureMask(int
Bit mask that defines set of features to enable mask)Overrides com.
Deprecated
Bulk set method for (re)setting states of all standard |
| public void | setSchema(FormatSchema
Schema to use schema)Overrides com. Method to call to make this parser use specified schema. |
| public JsonParser | skipChildren()
Implements abstract com. Method that will skip all child tokens of an array or
object token that the parser currently points to,
if (and only if) stream points to
|
| public StreamReadConstraints | streamReadConstraints()
Overrides com. Get the constraints to apply when performing streaming reads. |
| public Version | version()
Implements abstract com. Implements com. Accessor for getting version of the core package, given a parser instance. |