|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.json.JsonParser
com.google.api.client.json.gson.GsonParser
public class GsonParser
Low-level JSON serializer implementation based on GSON.
| Method Summary | |
|---|---|
void |
close()
Closes the parser and the underlying input stream or reader, and releases any memory associated with it. |
BigInteger |
getBigIntegerValue()
Returns the BigInteger value of the current token. |
byte |
getByteValue()
Returns the byte value of the current token. |
String |
getCurrentName()
Returns the most recent field name or null for array values or for root-level values. |
JsonToken |
getCurrentToken()
Returns the token the parser currently points to or null for none (at start of input or
after end of input). |
BigDecimal |
getDecimalValue()
Returns the BigDecimal value of the current token. |
double |
getDoubleValue()
Returns the double value of the current token. |
JsonFactory |
getFactory()
Returns the JSON factory from which this generator was created. |
float |
getFloatValue()
Returns the float value of the current token. |
int |
getIntValue()
Returns the int value of the current token. |
long |
getLongValue()
Returns the long value of the current token. |
short |
getShortValue()
Returns the short value of the current token. |
String |
getText()
Returns a textual representation of the current token or null if
JsonParser.getCurrentToken() is null. |
JsonToken |
nextToken()
Returns the next token from the stream or null to indicate end of input. |
JsonParser |
skipChildren()
Skips to the matching JsonToken.END_ARRAY if current token is
JsonToken.START_ARRAY, the matching JsonToken.END_OBJECT if the current token
is JsonToken.START_OBJECT, else does nothing. |
| Methods inherited from class com.google.api.client.json.JsonParser |
|---|
parse, parse, parseAndClose, parseAndClose, parseArray, parseArray, parseArrayAndClose, parseArrayAndClose, skipToKey |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void close()
throws IOException
JsonParser
close in class JsonParserIOException - if failedpublic String getCurrentName()
JsonParsernull for array values or for root-level values.
getCurrentName in class JsonParserpublic JsonToken getCurrentToken()
JsonParsernull for none (at start of input or
after end of input).
getCurrentToken in class JsonParserpublic JsonFactory getFactory()
JsonParser
getFactory in class JsonParserpublic byte getByteValue()
JsonParser
getByteValue in class JsonParserpublic short getShortValue()
JsonParser
getShortValue in class JsonParserpublic int getIntValue()
JsonParser
getIntValue in class JsonParserpublic float getFloatValue()
JsonParser
getFloatValue in class JsonParserpublic BigInteger getBigIntegerValue()
JsonParserBigInteger value of the current token.
getBigIntegerValue in class JsonParserpublic BigDecimal getDecimalValue()
JsonParserBigDecimal value of the current token.
getDecimalValue in class JsonParserpublic double getDoubleValue()
JsonParser
getDoubleValue in class JsonParserpublic long getLongValue()
JsonParser
getLongValue in class JsonParserpublic String getText()
JsonParsernull if
JsonParser.getCurrentToken() is null.
getText in class JsonParser
public JsonToken nextToken()
throws IOException
JsonParsernull to indicate end of input.
nextToken in class JsonParserIOException
public JsonParser skipChildren()
throws IOException
JsonParserJsonToken.END_ARRAY if current token is
JsonToken.START_ARRAY, the matching JsonToken.END_OBJECT if the current token
is JsonToken.START_OBJECT, else does nothing.
skipChildren in class JsonParserIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||