Class JacksonParser
java.lang.Object
com.google.api.client.json.JsonParser
com.google.api.client.json.jackson2.JacksonParser
Low-level JSON serializer implementation based on Jackson.
Implementation is not thread-safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JacksonFactory
private final com.fasterxml.jackson.core.JsonParser
-
Constructor Summary
ConstructorsConstructorDescriptionJacksonParser
(JacksonFactory factory, com.fasterxml.jackson.core.JsonParser parser) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the parser and the underlying input stream or reader, and releases any memory associated with it.Returns theBigInteger
value of the current token.byte
Returns the byte value of the current token.Returns the most recent field name ornull
for array values or for root-level values.Returns the token the parser currently points to ornull
for none (at start of input or after end of input).Returns theBigDecimal
value of the current token.double
Returns the double value of the current token.Returns the JSON factory from which this generator was created.float
Returns the float value of the current token.int
Returns the int value of the current token.long
Returns the long value of the current token.short
Returns the short value of the current token.getText()
Returns a textual representation of the current token ornull
ifJsonParser.getCurrentToken()
isnull
.Returns the next token from the stream ornull
to indicate end of input.Skips to the matchingJsonToken.END_ARRAY
if current token isJsonToken.START_ARRAY
, the matchingJsonToken.END_OBJECT
if the current token isJsonToken.START_OBJECT
, else does nothing.Methods inherited from class com.google.api.client.json.JsonParser
parse, parse, parse, parse, parse, parse, parseAndClose, parseAndClose, parseAndClose, parseAndClose, parseArray, parseArray, parseArray, parseArray, parseArrayAndClose, parseArrayAndClose, parseArrayAndClose, parseArrayAndClose, skipToKey, skipToKey
-
Field Details
-
parser
private final com.fasterxml.jackson.core.JsonParser parser -
factory
-
-
Constructor Details
-
JacksonParser
JacksonParser(JacksonFactory factory, com.fasterxml.jackson.core.JsonParser parser)
-
-
Method Details
-
getFactory
Description copied from class:JsonParser
Returns the JSON factory from which this generator was created.- Specified by:
getFactory
in classJsonParser
-
close
Description copied from class:JsonParser
Closes the parser and the underlying input stream or reader, and releases any memory associated with it.- Specified by:
close
in classJsonParser
- Throws:
IOException
-
nextToken
Description copied from class:JsonParser
Returns the next token from the stream ornull
to indicate end of input.- Specified by:
nextToken
in classJsonParser
- Throws:
IOException
-
getCurrentName
Description copied from class:JsonParser
Returns the most recent field name ornull
for array values or for root-level values.- Specified by:
getCurrentName
in classJsonParser
- Throws:
IOException
-
getCurrentToken
Description copied from class:JsonParser
Returns the token the parser currently points to ornull
for none (at start of input or after end of input).- Specified by:
getCurrentToken
in classJsonParser
-
skipChildren
Description copied from class:JsonParser
Skips to the matchingJsonToken.END_ARRAY
if current token isJsonToken.START_ARRAY
, the matchingJsonToken.END_OBJECT
if the current token isJsonToken.START_OBJECT
, else does nothing.- Specified by:
skipChildren
in classJsonParser
- Throws:
IOException
-
getText
Description copied from class:JsonParser
Returns a textual representation of the current token ornull
ifJsonParser.getCurrentToken()
isnull
.- Specified by:
getText
in classJsonParser
- Throws:
IOException
-
getByteValue
Description copied from class:JsonParser
Returns the byte value of the current token.- Specified by:
getByteValue
in classJsonParser
- Throws:
IOException
-
getFloatValue
Description copied from class:JsonParser
Returns the float value of the current token.- Specified by:
getFloatValue
in classJsonParser
- Throws:
IOException
-
getIntValue
Description copied from class:JsonParser
Returns the int value of the current token.- Specified by:
getIntValue
in classJsonParser
- Throws:
IOException
-
getShortValue
Description copied from class:JsonParser
Returns the short value of the current token.- Specified by:
getShortValue
in classJsonParser
- Throws:
IOException
-
getBigIntegerValue
Description copied from class:JsonParser
Returns theBigInteger
value of the current token.- Specified by:
getBigIntegerValue
in classJsonParser
- Throws:
IOException
-
getDecimalValue
Description copied from class:JsonParser
Returns theBigDecimal
value of the current token.- Specified by:
getDecimalValue
in classJsonParser
- Throws:
IOException
-
getDoubleValue
Description copied from class:JsonParser
Returns the double value of the current token.- Specified by:
getDoubleValue
in classJsonParser
- Throws:
IOException
-
getLongValue
Description copied from class:JsonParser
Returns the long value of the current token.- Specified by:
getLongValue
in classJsonParser
- Throws:
IOException
-