JsonParser
implementations. Contains most common things that are independent
of actual underlying input source.
| Modifier and Type | Field and Description |
|---|---|
| protected byte[] | _binaryValue
We will hold on to decoded binary data, for duration of
current event, so that multiple calls to
|
| protected ByteArrayBuilder | _byteArrayBuilder
ByteArrayBuilder is needed if 'getBinaryValue' is called. |
| protected boolean | _closed
Flag that indicates whether parser is closed or not. |
| protected long | _currInputProcessed
Number of characters/bytes that were contained in previous blocks (blocks that were already processed prior to the current buffer). |
| protected int | _currInputRow
Current row location of current point in input buffer, starting from 1, if available. |
| protected int | _currInputRowStart
Current index of the first character of the current row in input buffer. |
| protected int | _expLength
Length of the exponent part of the number, if any, not including 'e' marker or sign, just digits. |
| protected int | _fractLength
Length of the fractional part (not including decimal point or exponent), in characters. |
| protected int | _inputEnd
Index of character after last available one in the buffer. |
| protected int | _inputPtr
Pointer to next available character in buffer |
| protected int | _intLength
Length of integer part of the number, in characters |
| protected final IOContext | _ioContext
I/O context for this reader. |
| protected boolean | _nameCopied
Flag set to indicate whether the field name is available from the name copy buffer or not (in addition to its String representation being available via read context) |
| protected char[] | _nameCopyBuffer
Temporary buffer that is needed if field name is accessed
using |
| protected JsonToken | _nextToken
Secondary token related to the next token after current one; used if its type is known. |
| protected BigDecimal | |
| protected BigInteger | |
| protected double | |
| protected float | |
| protected int | |
| protected boolean | _numberIsNaN
Marker for explicit "Not a Number" (NaN) values that may be read by some formats: this includes positive and negative infinity, as well as "NaN" result for some arithmetic operations. |
| protected long | |
| protected boolean | _numberNegative
Flag that indicates whether numeric value has a negative value. |
| protected String | _numberString
Textual number representation captured from input in cases lazy-parsing is desired. |
| protected int | _numTypesValid
Bitfield that indicates which numeric representations have been calculated for the current type |
| protected JsonReadContext | _parsingContext
Information about parser context, context in which the next token is to be parsed (root, array, object). |
| protected final TextBuffer | _textBuffer
Buffer that contains contents of String values, including field names if necessary (name split across boundary, contains escape sequence, or access needed to char array) |
| protected int | _tokenInputCol
Column on input row that current token starts; 0-based (although in the end it'll be converted to 1-based) |
| protected int | _tokenInputRow
Input row on which current token starts, 1-based |
| protected long | _tokenInputTotal
Total number of bytes/characters read before start of current token. |
| protected static final JacksonFeatureSet |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | _checkStdFeatureChanges(int
Bitflag of standard features after they were changed newFeatureFlags, int Bitflag of standard features for which setting
did change changedFeatures)Helper method called to verify changes to standard features. |
| protected abstract void | |
| protected ContentReference | Returns: ContentReference object to use.Helper method used to encapsulate logic of including (or not) of
"content reference" when constructing |
| protected ContentReference | Returns: ContentReference object to use when source is not to be includedHelper method used to encapsulate logic of providing
"content reference" when constructing |
| protected BigInteger | |
| protected final int | |
| protected final int | |
| protected char | Returns: Character decoded, if anyMethod that sub-classes must implement to support escaped sequences in base64-encoded sections. |
| protected final int | |
| protected void | |
| protected BigDecimal | Returns: BigDecimal value of the current tokenInternal accessor that needs to be used for accessing number value of type
|
| protected BigInteger | Returns: BigInteger value of the current tokenInternal accessor that needs to be used for accessing number value of type
|
| public ByteArrayBuilder | |
| protected double | Returns: double value of the current tokenInternal accessor that needs to be used for accessing number value of type
|
| protected float | Returns: float value of the current tokenInternal accessor that needs to be used for accessing number value of type
|
| protected Object | Returns: Source reference
Deprecated
Since 2.13, use
_contentReference() instead.
|
| protected int[] | |
| protected void | |
| protected void | _handleEOF()
Implements abstract com. Method called when an EOF is encountered between tokens. |
| protected char | |
| protected int | |
| protected void | _parseNumericValue(int
Numeric type that we will immediately need, if any;
mostly necessary to optimize handling of floating point numbers expType)Method that will parse actual numeric value out of a syntactically valid number value. |
| private void | |
| private void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | _throwUnquotedSpace(int
Invalid control character i, String Addition description of context to use in exception message ctxtDesc)Method called to report a problem with unquoted control character. |
| protected String | Returns: Description to use as "valid tokens" in an exception message about invalid (unrecognized) JSON token: called when parser finds something that looks like unquoted textual token
|
| protected String | Returns: Description to use as "valid JSON values" in an exception message about invalid (unrecognized) JSON value: called when parser finds something that does not look like a value or separator.
|
| 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 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
|
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| 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 | 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 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 variant)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 JsonLocation | getCurrentLocation()
Implements abstract com.
Deprecated
Method that returns location of the last processed character; usually for error reporting purposes |
| public String | getCurrentName()
Implements abstract com.
Deprecated
Method that can be called to get the name associated with the current event. |
| 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 float | getFloatValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public int | getIntValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public long | getLongValue()
Implements abstract com. Numeric accessor that can be called when the current
token is of type |
| public JsonParser. | getNumberType()
Implements abstract 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 JsonReadContext | 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 long | |
| public int | |
| public int | |
| public JsonLocation | getTokenLocation()
Implements abstract com.
Deprecated
Method that return the starting location of the current token; that is, position of the first character from input that starts the current token. |
| protected static int[] | |
| public boolean | hasTextCharacters()
Implements abstract com. Method that can be used to determine whether calling of
|
| public boolean | isClosed()
Implements abstract com. Method that can be called to determine whether this parser is closed or not. |
| 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!). |
| protected boolean | |
| protected void | |
| 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 | 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 |
| protected IllegalArgumentException | |
| protected IllegalArgumentException | |
| protected final JsonToken | |
| protected final JsonToken | |
| protected final JsonToken | |
| protected final JsonToken | |
| public JsonParser | setFeatureMask(int
Bit mask that defines set of features to enable newMask)Overrides com.
Deprecated
Bulk set method for (re)setting states of all standard |
| public Version | version()
Implements abstract com. Implements com. Accessor for getting version of the core package, given a parser instance. |