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 boolean | _closed
Flag that indicates whether parser is closed or not. |
| protected JsonToken | _currToken
Last token retrieved via |
| protected final IOContext | _ioContext
I/O context for this reader. |
| protected JsonToken | _lastClearedToken
Last cleared token, if any: that is, value that was in
effect when |
| protected final ObjectReadContext | _objectReadContext
Context object provided by higher level functionality like databinding for two reasons: passing configuration information during construction, and to allow calling of some databind operations via parser instance. |
| protected final StreamReadConstraints | _streamReadConstraints
Constraints to use for this parser. |
| protected final int | _streamReadFeatures
Bit flag composed of bits that indicate which
|
| 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 | |
| protected static final int | |
| protected static final double | |
| protected static final long | |
| protected static final double | |
| protected static final int | |
| protected static final int | |
| protected static final double | |
| protected static final long | |
| protected static final double | |
| protected static final int | |
| 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 | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| protected | ParserMinimalBase(ObjectReadContext
Context for databinding readCtxt, IOContext Context for I/O handling, buffering ioCtxt, int Bit set of streamReadFeatures)StreamReadFeatures.Main constructor for sub-classes to use |
| protected | ParserMinimalBase(ObjectReadContext
Context for databinding readCtxt)Alternate constructors for cases where there is no real |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | _closeInput()
Abstract method for sub-classes to implement; to be called by
|
| protected InputCoercionException | |
| protected InputCoercionException | |
| protected TokenStreamLocation | 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 to check whether end-of-content is allowed at the current decoding position: formats often want to verify the all start/end token pairs match, for example. |
| 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 abstract void | |
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected < Nominal type parameter for bogus return value T> T | Returns: Nothing: never returns; declared so caller can use fake return to keep compiler happyBase 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 <T> T | |
| protected <T> T | |
| protected void | |
| 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 | |
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected final JsonToken | |
| protected final JsonToken | |
| protected final JsonToken | |
| protected JacksonException | |
| 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 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 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 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 Object | getEmbeddedObject()
Implements abstract tools. Accessor that can be called if (and only if) the current token
is |
| public JsonToken | getLastClearedToken()
Implements abstract tools. Method that can be called to get the last token that was
cleared using |
| public JsonParser. | getNumberTypeFP()
Implements abstract tools. If current token is of type
|
| public Object | getNumberValueDeferred()
Implements abstract tools. Method similar to |
| public Number | getNumberValueExact()
Implements abstract tools. Method similar to |
| public short | getShortValue()
Implements abstract tools. Numeric accessor that can be called when the current
token is of type |
| 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 boolean | getValueAsBoolean(boolean defaultValue)
Implements abstract tools. Method that will try to convert value of current token to a boolean. |
| 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 | 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 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 | 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 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 <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 int | streamReadFeatures()
Implements abstract tools. Bulk access method for getting state of all standard |