Java com.fasterxml.jackson.core JsonParser fields, constructors, methods, implement or subclass

Example usage for Java com.fasterxml.jackson.core JsonParser fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.fasterxml.jackson.core JsonParser.

The text is from its open source code.

Subclass

com.fasterxml.jackson.core.JsonParser has subclasses.
Click this link to see all its subclasses.

Implementation

com.fasterxml.jackson.core.JsonParser has the following implementations.
Click this link to see all its implementation.

Constructor

Method

voidclearCurrentToken()
Method called to "consume" the current token by effectively removing it so that #hasCurrentToken returns false, and #getCurrentToken null).
voidclose()
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 Feature#AUTO_CLOSE_SOURCE is enabled.
JsonParserconfigure(Feature f, boolean state)
Method for enabling or disabling specified feature (check Feature for list of features)
JsonParserdisable(Feature f)
Method for disabling specified feature (check Feature for list of features)
JsonParserenable(Feature f)
Method for enabling specified parser feature (check Feature for list of features)
BigIntegergetBigIntegerValue()
Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can not be used as a Java long primitive type due to its magnitude.
byte[]getBinaryValue()
Convenience alternative to #getBinaryValue(Base64Variant) that defaults to using Base64Variants#getDefaultVariant as the default encoding.
booleangetBooleanValue()
Convenience accessor that can be called when the current token is JsonToken#VALUE_TRUE or JsonToken#VALUE_FALSE .
bytegetByteValue()
Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a value of Java byte primitive type.
ClassgetClass()
Returns the runtime class of this Object .
ObjectCodecgetCodec()
Accessor for ObjectCodec associated with this parser, if any.
JsonLocationgetCurrentLocation()
Method that returns location of the last processed character; usually for error reporting purposes.
StringgetCurrentName()
Method that can be called to get the name associated with the current token: for JsonToken#FIELD_NAME s 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.
JsonTokengetCurrentToken()
Accessor to find which token parser currently points to, if any; null will be returned if none.
BigDecimalgetDecimalValue()
Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT or JsonToken#VALUE_NUMBER_INT .
doublegetDoubleValue()
Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT and it can be expressed as a Java double primitive type.
ObjectgetEmbeddedObject()
Accessor that can be called if (and only if) the current token is JsonToken#VALUE_EMBEDDED_OBJECT .
floatgetFloatValue()
Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT and it can be expressed as a Java float primitive type.
intgetIntValue()
Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a value of Java int primitive type.
longgetLongValue()
Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a Java long primitive type.
NumberTypegetNumberType()
If current token is of type JsonToken#VALUE_NUMBER_INT or JsonToken#VALUE_NUMBER_FLOAT , returns one of NumberType constants; otherwise returns null.
NumbergetNumberValue()
Generic number value accessor method that will work for all kinds of numeric values.
JsonStreamContextgetParsingContext()
Method that can be used to access current parsing context reader is in.
shortgetShortValue()
Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a value of Java short primitive type.
StringgetText()
Method for accessing textual representation of the current token; if no current token (before first call to #nextToken , or after encountering end-of-input), returns null.
char[]getTextCharacters()
Method similar to #getText , but that will return underlying (unmodifiable) character array that contains textual value, instead of constructing a String object to contain this information.
intgetTextLength()
Accessor used with #getTextCharacters , to know length of String stored in returned buffer.
intgetTextOffset()
Accessor used with #getTextCharacters , to know offset of the first text content character within buffer.
JsonLocationgetTokenLocation()
Method that return the starting location of the current token; that is, position of the first character from input that starts the current token.
booleangetValueAsBoolean()
Method that will try to convert value of current token to a boolean.
doublegetValueAsDouble()
Method that will try to convert value of current token to a Java double.
doublegetValueAsDouble(double defaultValue)
Method that will try to convert value of current token to a Java double.
intgetValueAsInt()
Method that will try to convert value of current token to a int.
intgetValueAsInt(int defaultValue)
Method that will try to convert value of current token to a int.
longgetValueAsLong()
Method that will try to convert value of current token to a long.
StringgetValueAsString()
Method that will try to convert value of current token to a java.lang.String .
booleanhasCurrentToken()
Method for checking whether parser currently points to a token (and data for that token is available).
booleanhasTextCharacters()
Method that can be used to determine whether calling of #getTextCharacters would be the most efficient way to access textual content for the event parser currently points to.
booleanisClosed()
Method that can be called to determine whether this parser is closed or not.
booleanisExpectedStartArrayToken()
Specialized accessor that can be used to verify that the current token indicates start array (usually meaning that current token is JsonToken#START_ARRAY ) when start array is expected.
BooleannextBooleanValue()
Method that fetches next token (as if calling #nextToken ) and if it is JsonToken#VALUE_TRUE or JsonToken#VALUE_FALSE returns matching Boolean value; otherwise return null.
intnextIntValue(int defaultValue)
Method that fetches next token (as if calling #nextToken ) and if it is JsonToken#VALUE_NUMBER_INT returns 32-bit int value; otherwise returns specified default value It is functionally equivalent to:
 return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? 
longnextLongValue(long defaultValue)
Method that fetches next token (as if calling #nextToken ) and if it is JsonToken#VALUE_NUMBER_INT returns 64-bit long value; otherwise returns specified default value It is functionally equivalent to:
 return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? 
StringnextTextValue()
Method that fetches next token (as if calling #nextToken ) and if it is JsonToken#VALUE_STRING returns contained String value; otherwise returns null.
JsonTokennextToken()
Main iteration method, which will advance stream enough to determine type of the next token, if any.
JsonTokennextValue()
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).
TreadValueAs(Class valueType)
Method to deserialize JSON content into a non-container type (it can be an array type, however): typically a bean, array or a wrapper type (like java.lang.Boolean ).
TreadValueAs(TypeReference valueTypeRef)
Method to deserialize JSON content into a Java type, reference to which is passed as argument.
TreadValueAsTree()
Method to deserialize JSON content into equivalent "tree model", represented by root TreeNode of resulting model.
IteratorreadValuesAs(Class valueType)
Method for reading sequence of Objects from parser stream, all with same specified value type.
IteratorreadValuesAs(TypeReference valueTypeRef)
Method for reading sequence of Objects from parser stream, all with same specified value type.
voidsetCodec(ObjectCodec c)
Setter that allows defining ObjectCodec associated with this parser, if any.
JsonParserskipChildren()
Method that will skip all child tokens of an array or object token that the parser currently points to, iff stream points to JsonToken#START_OBJECT or JsonToken#START_ARRAY .
StringtoString()
Returns a string representation of the object.