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.
getParsingContext().setCurrentValue(v);
|
| public boolean | canReadObjectId()
Overrides com. |
| public boolean | canReadTypeId()
Overrides com. |
| public boolean | canUseSchema(FormatSchema
Schema to check schema)Overrides com. setSchema).
|
| public void | clearCurrentToken()
Implements abstract com. hasCurrentToken returns false, and
getCurrentToken null).
|
| public void | close()
Implements abstract com. Implements java. Feature#AUTO_CLOSE_SOURCE is enabled.
|
| public JsonLocation | currentLocation()
Overrides com. |
| public String | currentName()
Overrides com. JsonToken#FIELD_NAMEs it will
be the same as what getText returns;
for field values it will be preceding field name;
and for others (array values, root-level values) null.
|
| public JsonToken | currentToken()
Overrides com. |
| public int | currentTokenId()
Overrides com. getCurrentToken() but that returns an
int instead of JsonToken (enum value).
|
| public JsonLocation | currentTokenLocation()
Overrides com. |
| public Object | currentValue()
Overrides com.
getParsingContext().getCurrentValue();
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. Feature for list of features)
|
| public JsonParser | enable(JsonParser.
Feature to enable fOverrides com. Feature for list of features)
|
| public void | finishToken()
Overrides com. |
| public BigInteger | getBigIntegerValue()
Implements abstract com. JsonToken#VALUE_NUMBER_INT and
it can not be used as a Java long primitive type due to its
magnitude.
|
| public byte[] | getBinaryValue(Base64Variant
Expected variant of base64 encoded
content (see b64variant)Base64Variants for definitions
of "standard" variants).Implements abstract com. |
| public boolean | getBooleanValue()
Overrides com. JsonToken#VALUE_TRUE or
JsonToken#VALUE_FALSE, to return matching boolean
value.
|
| public byte | getByteValue()
Overrides com. JsonToken#VALUE_NUMBER_INT and
it can be expressed as a value of Java byte primitive type.
|
| public ObjectCodec | getCodec()
Implements abstract com. ObjectCodec associated with this
parser, if any.
|
| public JsonLocation | getCurrentLocation()
Implements abstract com. currentLocation(), to be deprecated in later
Jackson 2.x versions (and removed from Jackson 3.0).
|
| public String | getCurrentName()
Implements abstract com. currentName().
|
| public JsonToken | getCurrentToken()
Implements abstract com. currentToken(), may be deprecated sometime after
Jackson 2.13 (will be removed from 3.0).
|
| public int | getCurrentTokenId()
Implements abstract com.
Deprecated
Deprecated alias for currentTokenId().
|
| public Object | getCurrentValue()
Overrides com. currentValue(), to be deprecated in later
Jackson 2.x versions (and removed from Jackson 3.0).
|
| public BigDecimal | getDecimalValue()
Implements abstract com. JsonToken#VALUE_NUMBER_FLOAT or
JsonToken#VALUE_NUMBER_INT.
|
| public double | getDoubleValue()
Implements abstract com. JsonToken#VALUE_NUMBER_FLOAT and
it can be expressed as a Java double primitive type.
|
| public Object | getEmbeddedObject()
Overrides com. JsonToken#VALUE_EMBEDDED_OBJECT.
|
| public int | getFeatureMask()
Overrides com. Features.
|
| public float | getFloatValue()
Implements abstract com. JsonToken#VALUE_NUMBER_FLOAT and
it can be expressed as a Java float primitive type.
|
| public Object | getInputSource()
Overrides com. InputStream or Reader, depending on what
parser was constructed with.
|
| public int | getIntValue()
Implements abstract com. JsonToken#VALUE_NUMBER_INT and
it can be expressed as a value of Java int primitive type.
|
| public JsonToken | getLastClearedToken()
Implements abstract com. clearCurrentToken.
|
| public long | getLongValue()
Implements abstract com. JsonToken#VALUE_NUMBER_INT and
it can be expressed as a Java long primitive type.
|
| public JsonParser. | getNumberType()
Implements abstract com. JsonToken#VALUE_NUMBER_INT or
JsonToken#VALUE_NUMBER_FLOAT, returns
one of NumberType constants; otherwise returns null.
|
| public Number | getNumberValue()
Implements abstract com. |
| public Object | getNumberValueDeferred()
Overrides com. getNumberValue but that returns
either same Number value as getNumberValue()
(if already decoded), or String representation of
as-of-yet undecoded number.
|
| public Number | getNumberValueExact()
Overrides com. getNumberValue with the difference that
for floating-point numbers value returned may be BigDecimal
if the underlying format does not store floating-point numbers using
native representation: for example, textual formats represent numbers
as Strings (which are 10-based), and conversion to java.
is potentially lossy operation.
|
| public Object | getObjectId()
Overrides com. |
| public JsonStreamContext | getParsingContext()
Implements abstract com. |
| public JacksonFeatureSet | getReadCapabilities()
Overrides com. |
| public FormatSchema | getSchema()
Method for accessing Schema that this parser uses, if any.
|
| public short | getShortValue()
Overrides com. JsonToken#VALUE_NUMBER_INT and
it can be expressed as a value of Java short primitive type.
|
| public String | getText()
Implements abstract com. nextToken, or
after encountering end-of-input), returns null.
|
| public int | |
| public char[] | getTextCharacters()
Implements abstract com. getText, but that will return
underlying (unmodifiable) character array that contains
textual value, instead of constructing a String object
to contain this information.
|
| public int | getTextLength()
Implements abstract com. getTextCharacters, to know length
of String stored in returned buffer.
|
| public int | getTextOffset()
Implements abstract com. getTextCharacters, to know offset
of the first text content character within buffer.
|
| public JsonLocation | getTokenLocation()
Implements abstract com. currentTokenLocation(), to be deprecated in later
Jackson 2.x versions (and removed from Jackson 3.0).
|
| public Object | getTypeId()
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. |
| public boolean | getValueAsBoolean(boolean
Default value to return if conversion to defaultValue)boolean is not possibleOverrides com. |
| public double | getValueAsDouble()
Overrides com. |
| public double | getValueAsDouble(double
Default value to return if conversion to defaultValue)double is not possibleOverrides com. |
| public int | getValueAsInt()
Overrides com. int value.
|
| public int | getValueAsInt(int
Default value to return if conversion to defaultValue)int is not possibleOverrides com. |
| public long | getValueAsLong()
Overrides com. |
| public long | getValueAsLong(long
Default value to return if conversion to defaultValue)long is not possibleOverrides com. |
| public String | getValueAsString()
Overrides com. java..
|
| public String | getValueAsString(String
Default value to return if conversion to defaultValue)String is not possibleImplements abstract com. java..
|
| public boolean | hasCurrentToken()
Implements abstract com. |
| public boolean | hasTextCharacters()
Implements abstract com. getTextCharacters would be the most efficient
way to access textual content for the event parser currently
points to.
|
| public boolean | hasToken(JsonToken
Token to match t)Implements abstract com.
return currentToken() == t
but may be more efficiently implemented.
|
| public boolean | hasTokenId(int
Token id to match (from (@link JsonTokenId}) id)Implements abstract com.
return currentTokenId() == id
but may be more efficiently implemented.
|
| public boolean | isClosed()
Implements abstract com. |
| public boolean | isEnabled(JsonParser.
Feature to check fOverrides com. Feature is enabled.
|
| public boolean | isExpectedNumberIntToken()
Overrides com. isExpectedStartArrayToken(), but checks whether stream
currently points to JsonToken#VALUE_NUMBER_INT.
|
| public boolean | isExpectedStartArrayToken()
Overrides com. JsonToken#START_ARRAY) when start array is expected.
|
| public boolean | isExpectedStartObjectToken()
Overrides com. isExpectedStartArrayToken(), but checks whether stream
currently points to JsonToken#START_OBJECT.
|
| public boolean | isNaN()
Overrides com. JsonToken#VALUE_NUMBER_FLOAT.
|
| public JsonToken | nextToken()
Implements abstract com. |
| public JsonToken | nextValue()
Implements abstract com. |
| public void | overrideCurrentName(String
Name to use as the current name; may be null. name)Implements abstract com. |
| 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. FormatFeatures,
by specifying values (set / clear) along with a mask, to determine
which features to change, if any.
|
| 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. mask.
|
| public int | readBinaryValue(Base64Variant
base64 variant to use b64variant, OutputStream Output stream to use for passing decoded binary data out)Overrides com. readBinaryValue(OutputStream) but allows explicitly
specifying base64 variant to use.
|
| public boolean | requiresCustomCodec()
Overrides com. ObjectCodec is needed for binding data parsed
using JsonParser constructed by this factory
(which typically also implies the same for serialization
with JsonGenerator).
|
| public void | setCodec(ObjectCodec
Codec to assign, if any; c)null if noneImplements abstract com. ObjectCodec associated with this
parser, if any.
|
| public void | setCurrentValue(Object
Current value to assign for the current input context of this parser v)Overrides com. assignCurrentValue, to be deprecated in later
Jackson 2.x versions (and removed from Jackson 3.0).
|
| 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 Features
|
| public void | setSchema(FormatSchema
Schema to use schema)
Method to call to make this parser use specified schema.
|
| public JsonParser | skipChildren()
Implements abstract com. JsonToken#START_OBJECT or JsonToken#START_ARRAY.
|
| public StreamReadConstraints | streamReadConstraints()
Overrides com. |
| public Version | version()
Implements abstract com. Implements com. |