public interface JsonReader
extends java.lang.AutoCloseable
JsonStreamFactory| Modifier and Type | Method and Description |
|---|---|
void |
close()
Free resources associated with this reader.
|
java.math.BigDecimal |
getBigDecimal()
Converts available context data to
BigDecimal. |
java.math.BigInteger |
getBigInteger()
Converts available context data to
BigInteger. |
boolean |
getBoolean()
Converts available context data to
boolean. |
byte |
getByte()
Converts available context data to
byte. |
double |
getDouble()
Converts available context data to
double. |
float |
getFloat()
Converts available context data to
float. |
int |
getInt()
Converts available context data to
int. |
long |
getLong()
Converts available context data to
long. |
short |
getShort()
Converts available context data to
short. |
java.lang.String |
getString()
Converts available context data to
String. |
boolean |
hasNext()
Detects if there is next JSON parsing event available.
|
boolean |
isArrayEnd()
Returns
true if current JSON parsing event is JSON array end token, false otherwise. |
boolean |
isArrayStart()
Returns
true if current JSON parsing event is JSON array start token, false otherwise. |
boolean |
isBoolean()
Returns
true if current JSON parsing event is JSON boolean token, false otherwise. |
boolean |
isNull()
Returns
true if current JSON parsing event is JSON null token, false otherwise. |
boolean |
isNumber()
Returns
true if current JSON parsing event is JSON number, false otherwise. |
boolean |
isObjectEnd()
Returns
true if current JSON parsing event is JSON object end token, false otherwise. |
boolean |
isObjectStart()
Returns
true if current JSON parsing event is JSON object start token, false otherwise. |
boolean |
isString()
Returns
true if current JSON parsing event is JSON string, false otherwise. |
JsonEvent |
next()
Returns next JSON parsing event.
|
boolean hasNext()
next() method.JsonEvent next() throws java.io.IOException, JsonException
hasNext() before calling this method.java.io.IOException - if some I/O error occursJsonException - if wrong JSON is detectedboolean isObjectStart()
true if current JSON parsing event is JSON object start token, false otherwise.
Users have to call next() before calling this method.boolean isObjectEnd()
true if current JSON parsing event is JSON object end token, false otherwise.
Users have to call next() before calling this method.boolean isArrayStart()
true if current JSON parsing event is JSON array start token, false otherwise.
Users have to call next() before calling this method.boolean isArrayEnd()
true if current JSON parsing event is JSON array end token, false otherwise.
Users have to call next() before calling this method.boolean isNull()
true if current JSON parsing event is JSON null token, false otherwise.
Users have to call next() before calling this method.boolean isString()
true if current JSON parsing event is JSON string, false otherwise.
Users have to call next() before calling this method.java.lang.String getString()
String.
Users have to call next() and should call isString() before calling this method.java.lang.IllegalStateException - if cursor isn't pointing to JSON Stringboolean isBoolean()
true if current JSON parsing event is JSON boolean token, false otherwise.
Users have to call next() before calling this method.boolean getBoolean()
boolean.
Users have to call next() and should call isBoolean() before calling this method.java.lang.IllegalStateException - if cursor isn't pointing to JSON boolean tokenboolean isNumber()
true if current JSON parsing event is JSON number, false otherwise.
Users have to call next() before calling this method.byte getByte()
byte.
Users have to call next() and should call isNumber() before calling this method.java.lang.NumberFormatException - if JSON number is not convertible to byteshort getShort()
short.
Users have to call next() and should call isNumber() before calling this method.java.lang.NumberFormatException - if JSON number is not convertible to shortint getInt()
int.
Users have to call next() and should call isNumber() before calling this method.java.lang.NumberFormatException - if JSON number is not convertible to intlong getLong()
long.
Users have to call next() and should call isNumber() before calling this method.java.lang.NumberFormatException - if JSON number is not convertible to longfloat getFloat()
float.
Users have to call next() and should call isNumber() before calling this method.java.lang.NumberFormatException - if JSON number is not convertible to floatdouble getDouble()
double.
Users have to call next() and should call isNumber() before calling this method.java.lang.NumberFormatException - if JSON number is not convertible to doublejava.math.BigInteger getBigInteger()
BigInteger.
Users have to call next() and should call isNumber() before calling this method.java.lang.NumberFormatException - if JSON number is not convertible to BigIntegerjava.math.BigDecimal getBigDecimal()
BigDecimal.
Users have to call next() and should call isNumber() before calling this method.java.lang.NumberFormatException - if JSON number is not convertible to BigDecimalvoid close()
throws java.io.IOException,
JsonException
close in interface java.lang.AutoCloseablejava.io.IOException - if some I/O error occursJsonException - if wrong JSON is detectedCopyright © 2017 FOSS Nova Software Foundation. All rights reserved.