JsonFactory instance.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | JsonParser.
Enumeration of possible "native" (optimal) types that can be used for numbers. |
| public static enum | JsonParser.
Enumeration of possible physical Floating-Point types that underlying format uses. |
| Modifier and Type | Field and Description |
|---|---|
| protected static final JacksonFeatureSet | DEFAULT_READ_CAPABILITIES
Set of default |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected StreamReadException | Returns: StreamReadException constructedBase exception message to construct exception with msg)Helper method for constructing |
| protected StreamReadException | |
| protected StreamReadException | |
| protected StreamReadException | |
| protected StreamReadException | Returns: Read exception (of typeStreamReadException) constructedBase exception message to construct exception with msg, Throwable Root cause to assign t)Helper method for constructing |
| protected StreamReadException | Returns: Read exception (of typeStreamReadException) constructedBase exception message to construct exception with msg, TokenStreamLocation Error location to report loc)Helper method for constructing |
| protected void | _reportUnsupportedOperation()
Helper method to call for operations that are not supported by parser implementation. |
| public abstract void | assignCurrentValue(Object
"Current value" to assign to the current input context of this parser v)Helper method, usually equivalent to:
|
| public boolean | Returns: True if this is a non-blocking ("asynchronous") parserMethod that can be called to determine if this parser instance uses non-blocking ("asynchronous") input access for decoding or not. |
| public boolean | Returns: True if the format being read supports native Object Ids;
false if notIntrospection 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 | Returns: True if the format being read supports native Type Ids;
false if notIntrospection 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 abstract void | clearCurrentToken()
Method called to "consume" the current token by effectively
removing it so that |
| public abstract void | close()
Redeclares 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 abstract TokenStreamLocation | Returns: Location of the last processed input unit (byte or character)Method that returns location of the last processed character; usually for error reporting purposes. |
| public abstract String | Returns: Name of the current property name, if any, in the parsing context (null if none)Method that can be called to get the name associated with
the current token: for |
| public abstract int | Returns: Index of the matched property name, if non-negative, or a negative error code otherwise (seePropertyNameMatcher for details)Matcher that will handle actual matching matcher)Method that verifies that the current token (see |
| public abstract JsonToken | Returns: Type of the token this parser currently points to, if any: null before any tokens have been read, and after end-of-input has been encountered, as well as if the current token has been explicitly cleared.Accessor to find which token parser currently points to, if any; null will be returned if none. |
| public abstract long | Returns: the number of tokens that have been read (-1 if the count is not available)Get an approximate count of the number of tokens that have been read. |
| public abstract int | currentTokenId()
Method similar to |
| public abstract TokenStreamLocation | Returns: Starting location of the token parser currently points toMethod that return the starting location of the current token; that is, position of the first character from input that starts the current token. |
| public abstract Object | Returns: "Current value" for the current input context this parser hasHelper 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 abstract void | finishToken()
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 abstract BigInteger | Returns: Current number value asBigInteger (if numeric token);
otherwise exception thrownNumeric accessor that can be called when the current
token is of type |
| public abstract byte[] | Returns: Decoded binary dataExpected variant of base64 encoded
content (see bv)Base64Variants for definitions
of "standard" variants).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 byte[] | Returns: Decoded binary dataConvenience alternative to |
| public abstract boolean | Returns: True if current token is JsonToken.VALUE_TRUE,
false if current token is JsonToken.VALUE_FALSE;
otherwise throws InputCoercionExceptionConvenience accessor that can be called when the current
token is |
| public abstract byte | Returns: Current number value asbyte (if numeric token within
range of [-128, 255]); otherwise exception thrownNumeric accessor that can be called when the current
token is of type |
| public abstract BigDecimal | Returns: Current number value asBigDecimal (if numeric token);
otherwise exception thrownNumeric accessor that can be called when the current
token is of type |
| public abstract double | Returns: Current number value asdouble (if numeric token within
Java double range); otherwise exception thrownNumeric accessor that can be called when the current
token is of type |
| public abstract Object | Returns: Embedded value (usually of "native" type supported by format) for the current token, if any;null otherwiseAccessor that can be called if (and only if) the current token
is |
| public abstract float | Returns: Current number value asfloat (if numeric token within
Java float range); otherwise exception thrownNumeric accessor that can be called when the current
token is of type |
| public abstract int | Returns: Current number value asint (if numeric token within
Java 32-bit signed int range); otherwise exception thrownNumeric accessor that can be called when the current
token is of type |
| public abstract JsonToken | Returns: Last cleared token, if any;null otherwiseMethod that can be called to get the last token that was
cleared using |
| public abstract long | Returns: Current number value aslong (if numeric token within
Java 32-bit signed long range); otherwise exception thrownNumeric accessor that can be called when the current
token is of type |
| public abstract JsonParser. | Returns: Type of current number, if parser points to numeric token;null otherwiseIf current token is of type
|
| public abstract JsonParser. | Returns: Type of current number, if parser points to numeric token;null otherwiseIf current token is of type
|
| public abstract Number | Returns: Numeric value of the current token in its most optimal representationGeneric number value accessor method that will work for all kinds of numeric values. |
| public abstract Object | getNumberValueDeferred()
Method similar to |
| public abstract Number | Returns: Numeric value of the current token using most accurate representationMethod similar to |
| public Object | Returns: Native Object id associated with the current token, if any;null if noneMethod 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 FormatSchema | |
| public abstract short | Returns: Current number value asshort (if numeric token within
Java 16-bit signed short range); otherwise exception thrownNumeric accessor that can be called when the current
token is of type |
| public abstract String | Returns: String value associated with the current token (one returned bynextToken() or other iteration methods)Method for accessing textual representation of the current token;
if no current token (before first call to |
| public abstract int | |
| public abstract char[] | Returns: Buffer that contains the current textual value (but not necessarily at offset 0, and not necessarily until the end of buffer)Method similar to |
| public abstract int | Returns: Number of characters within buffer returned bygetStringCharacters that are part of
textual content of the current token.Accessor used with |
| public abstract int | Returns: Offset of the first character within buffer returned bygetStringCharacters that is part of
textual content of the current token.Accessor used with |
| public String | getText()
Deprecated
since 3.0 use
getString() instead.
Deprecated alias for |
| public char[] | getTextCharacters()
Deprecated
since 3.0 use
getStringCharacters() instead.
Deprecated alias for |
| public int | getTextLength()
Deprecated
since 3.0 use
getStringLength() instead.
Deprecated alias for |
| public int | getTextOffset()
Deprecated
since 3.0 use
getStringOffset() instead.
Deprecated alias for |
| public Object | Returns: Native Type Id associated with the current token, if any;null if noneMethod 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 | Returns: boolean value current token is converted to, if possible; or false if notMethod that will try to convert value of current token to a boolean. |
| public abstract boolean | Returns: boolean value current token is converted to, if possible; def otherwiseDefault value to return if conversion to def)boolean is not possibleMethod that will try to convert value of current token to a boolean. |
| public double | Returns: double value current token is converted to, if possible;
default value otherwiseMethod that will try to convert value of current token to a Java double. |
| public double | Returns: double value current token is converted to, if possible; def otherwiseDefault value to return if conversion to def)double is not possibleMethod that will try to convert value of current token to a Java double. |
| public int | Returns: int value current token is converted to, if possible; default value otherwise
otherwiseMethod that will try to convert value of current token to a
Java |
| public int | Returns: int value current token is converted to, if possible; def otherwiseDefault value to return if conversion to def)int is not possibleMethod that will try to convert value of current token to a
|
| public long | Returns: long value current token is converted to, if possible; default value otherwiseMethod that will try to convert value of current token to a
|
| public long | Returns: long value current token is converted to, if possible; def otherwiseDefault value to return if conversion to def)long is not possibleMethod that will try to convert value of current token to a
|
| public String | |
| public abstract String | getValueAsString(String
Default value to return if conversion to def)String is not possibleMethod that will try to convert value of current token to a
|
| public abstract boolean | hasCurrentToken()
Method for checking whether parser currently points to a token (and data for that token is available). |
| public abstract boolean | Returns: True if parser currently has character array that can be efficiently returned viagetStringCharacters; false
means that it may or may not existMethod that can be used to determine whether calling of
|
| public abstract boolean | |
| public abstract boolean | Returns: True if the parser current points to specified tokenToken id to match (from (@link JsonTokenId}) id)Method that is functionally equivalent to:
|
| public abstract boolean | Returns: True if this parser instance has been closedMethod that can be called to determine whether this parser is closed or not. |
| public abstract boolean | Returns: True if feature is enabled; false otherwiseFeature to check f)Method for checking whether specified |
| public abstract boolean | Returns: True if the current token can be considered as a start-array marker (suchJsonToken#VALUE_NUMBER_INT);
false if notSimilar to |
| public abstract boolean | Returns: True if the current token can be considered as a start-array marker (suchJsonToken#START_ARRAY);
false if notSpecialized accessor that can be used to verify that the current
token indicates start array (usually meaning that current token
is |
| public abstract boolean | Returns: True if the current token can be considered as a start-array marker (suchJsonToken#START_OBJECT);
false if notSimilar to |
| public abstract boolean | Returns: True if the current token is reported as JsonToken#VALUE_NUMBER_FLOAT
and represents a "Not a Number" value; false for other tokens and regular
floating-point numbers.Accessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!). |
| public Boolean | Returns: Boolean value of the JsonToken.VALUE_TRUE or JsonToken.VALUE_FALSE
token parser advanced to; or null if next token is of some other typeMethod that fetches next token (as if calling |
| public int | Returns: Integer (int) value of the JsonToken.VALUE_NUMBER_INT token parser advanced
to; or defaultValue if next token is of some other typeValue to return if next token is NOT of type defaultValue)JsonToken.VALUE_NUMBER_INTMethod that fetches next token (as if calling return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? |
| public long | Returns: long value of the JsonToken.VALUE_NUMBER_INT token parser advanced
to; or defaultValue if next token is of some other typeValue to return if next token is NOT of type defaultValue)JsonToken.VALUE_NUMBER_INTMethod that fetches next token (as if calling return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? |
| public abstract String | Returns: Name of the theJsonToken.PROPERTY_NAME parser advanced to, if any;
null if next token is of some other typeMethod that fetches next token (as if calling |
| public abstract boolean | Returns: True if parser advanced to JsonToken.PROPERTY_NAME with
specified name; false otherwise (different token or non-matching name)Property name to compare next token to (if next token is
str)JsonToken.PROPERTY_NAME)Method that fetches next token (as if calling |
| public abstract int | Returns: Index of the matched property name, if non-negative, or a negative error code otherwise (seePropertyNameMatcher for details)Matcher that will handle actual matching matcher)Method that tries to match next token from stream as |
| public String | Returns: String value ofJsonToken.VALUE_STRING token parser advanced
to; or null if next token is of some other typeMethod that fetches next token (as if calling |
| public abstract JsonToken | Returns: Next token from the stream, if any found, or null to indicate end-of-inputMain iteration method, which will advance stream enough to determine type of the next token, if any. |
| public abstract JsonToken | Returns: Next non-field-name token from the stream, if any found, or null to indicate end-of-input (or, for non-blocking parsers,JsonToken#NOT_AVAILABLE if no tokens were
available yet)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 NonBlockingInputFeeder | Returns: Input feeder to use with non-blocking (async) parsingMethod that will either return a feeder instance (if parser uses
non-blocking, aka asynchronous access); or |
| public abstract ObjectReadContext | Returns: Object write context (ObjectReadContext) associated with this parserAccessor 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 int | Returns: Number of bytes that were decoded and written viaOutputStreamOutput stream to use for passing decoded binary data out)Method that can be used as an alternative to |
| public int | Returns: Number of bytes that were decoded and written viaOutputStreambase64 variant to use bv, OutputStream Output stream to use for passing decoded binary data out)Similar to |
| public abstract < Nominal type parameter to specify expected node type to
reduce need to cast result value T> T | Returns: Java value read from contentType to bind content to valueType)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 abstract < Nominal type parameter to specify expected node type to
reduce need to cast result value T> T | Returns: Java value read from contentType to bind content to valueTypeRef)Method to deserialize stream content into a Java type, reference to which is passed as argument. |
| public abstract <T> T | |
| public abstract < Nominal type parameter for result node type (to reduce need for casting) T extends TreeNode> T | Returns: root of the document, or null if empty or whitespace.Method to deserialize stream content into equivalent "tree model",
represented by root |
| public int | Returns: -1 if the underlying content source is not byte based (that is, input cannot be sent toOutputStream;
otherwise number of bytes released (0 if there was nothing to release)OutputStream to which buffered, undecoded content is written to out)Method that can be called to push back any content that has been read but not consumed by the parser. |
| public int | Returns: -1 if the underlying content source is not char-based (that is, input cannot be sent toWriter;
otherwise number of chars released (0 if there was nothing to release)Writer to which buffered but unprocessed content is written to w)Method that can be called to push back any content that has been read but not consumed by the parser. |
| public abstract JsonParser | Returns: This parser, to allow call chainingMethod that will skip all child tokens of an array or
object token that the parser currently points to,
iff stream points to
|
| public abstract JacksonFeatureSet | Returns: Set of read capabilities for content to read via this parserAccessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly). |
| public abstract StreamReadConstraints | Returns: Constraints applied to this parserGet the constraints to apply when performing streaming reads. |
| public abstract TokenStreamContext | Returns: Stream output context (TokenStreamContext) associated with this parserMethod 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 int | Returns: Bit mask that defines current states of all standardStreamReadFeatures.Bulk access method for getting state of all standard |
| public abstract Object | Returns: Input source this parser was configured withMethod that can be used to get access to object that is used
to access input being parsed; this is usually either
|
| public abstract Version | version()
Redeclares tools. Accessor for getting version of the core package, given a parser instance. |