JsonParser
implementations, but does not add any additional fields that depend
on particular method of obtaining input.
Note that 'minimal' here mostly refers to minimal number of fields (size) and functionality that is specific to certain types of parser implementations; but not necessarily to number of methods.
| Modifier and Type | Field and Description |
|---|---|
| protected JsonToken | _currToken
Last token retrieved via |
| protected JsonToken | _lastClearedToken
Last cleared token, if any: that is, value that was in
effect when |
| protected final StreamReadConstraints | |
| protected long | _tokenCount
Current count of tokens, if tracked (see |
| protected final boolean | _trackMaxTokenCount
Whether or not to track the token count due a |
| protected static final BigDecimal | |
| protected static final BigDecimal | |
| protected static final BigDecimal | |
| protected static final BigDecimal | |
| protected static final BigInteger | |
| protected static final BigInteger | |
| protected static final BigInteger | |
| protected static final BigInteger | |
| protected static final char | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | MAX_ERROR_TOKEN_LENGTH
Deprecated
Since 2.16. Maximum number of characters to include in token reported
as part of error messages.
ErrorReportConfiguration#getMaxErrorTokenLength() will be used instead.
|
| protected static final double | |
| protected static final long | |
| protected static final double | |
| protected static final double | |
| protected static final long | |
| protected static final double | |
| protected static final byte[] | |
| protected static final int[] | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | NR_FLOAT
Note Not used by JSON implementation but used by many of binary codecs |
| protected static final int | |
| protected static final int | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected static String | |
| protected static byte[] | |
| protected final JsonParseException | |
| protected JsonLocation | Returns: Same ascurrentLocation() except offset by -1Factory method used to provide location for cases where we must read and consume a single "wrong" character (to possibly allow error recovery), but need to report accurate location for that character: if so, the current location is past location we want, and location we want will be "one location earlier". |
| protected void | _decodeBase64(String
String to decode str, ByteArrayBuilder Builder used to buffer binary content decoded builder, Base64Variant Base64 variant expected in content b64variant)Helper method that can be used for base64 decoding in cases where encoded content has already been read as a String. |
| protected static final String | |
| protected abstract void | _handleEOF()
Method sub-classes need to implement for verifying that end-of-content is acceptable at current input position. |
| protected boolean | Returns: True if given value contains "null equivalent" String value (for content this parser handles).String value to check value)Helper method used to determine whether we are currently pointing to a String value of "null" (NOT a null token); and, if so, that parser is to recognize and return it similar to if it was real null token. |
| protected String | |
| protected String | |
| protected final JsonToken | |
| protected final void | |
| protected final void | |
| protected final void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected < Nominal type for bogus return value T> T | Returns: Nothing, just declared to let caller usereturn when
calling this method, to keep compiler happy.Character that was unexpected ch, String Additional failure comment to add, if any comment)
|
| protected final void | |
| protected final <T> T | |
| protected void | |
| protected final JsonToken | |
| protected final JsonToken | |
| protected final JsonToken | |
| protected final void | |
| public void | clearCurrentToken()
Implements abstract com. Method called to "consume" the current token by effectively
removing it so that |
| public abstract void | close()
Redeclares java. Implements abstract com. 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 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 abstract 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 abstract String | getCurrentName()
Implements abstract com.
Deprecated
Deprecated alias of |
| public JsonToken | getCurrentToken()
Implements abstract com. Alias for |
| public int | getCurrentTokenId()
Implements abstract com.
Deprecated
Deprecated alias for |
| public JsonToken | getLastClearedToken()
Implements abstract com. Method that can be called to get the last token that was
cleared using |
| public abstract 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 abstract String | getText()
Implements abstract com. Method for accessing textual representation of the current token;
if no current token (before first call to |
| public abstract char[] | getTextCharacters()
Implements abstract com. Method similar to |
| public abstract int | getTextLength()
Implements abstract com. Accessor used with |
| public abstract int | getTextOffset()
Implements abstract com. Accessor used with |
| 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(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 abstract 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 abstract boolean | isClosed()
Implements abstract com. Method that can be called to determine whether this parser is closed or not. |
| 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 abstract 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 abstract 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. |
| protected void | reportInvalidNumber(String
Base exception message to use msg)Method called to throw an exception for input token that looks like a number based on first character(s), but is not valid according to rules of format. |
| protected void | reportOverflowInt()
Method called to throw an exception for integral (not floating point) input
token with value outside of Java signed 32-bit range when requested as |
| protected void | |
| protected void | |
| protected void | reportOverflowLong()
Method called to throw an exception for integral (not floating point) input
token with value outside of Java signed 64-bit range when requested as |
| protected void | |
| protected void | |
| protected void | |
| 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. |