Package io.avaje.jsonb
Interface JsonReader
- All Superinterfaces:
AutoCloseable,Closeable
Reads json content as a stream of JSON tokens and content.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA structure, name, or value type in a JSON-encoded string. -
Method Summary
Modifier and TypeMethodDescriptionvoidRead array begin.voidRead begin object.voidclose()Close the resources of the reader.voidendArray()Read array end.voidRead end object.booleanReturn true if there is a next element.booleanReturn true if there is a next field to be read.Read and return the next value as a BigInteger.booleanRead and return the next value as a boolean.Read and return the next value as a BigDecimal.doubleRead and return the next value as a double.Return the next field.intnextInt()Read and return the next value as an int.longnextLong()Read and return the next value as a long.<T> TnextNull()Return the next value as a null.Read and return the next value as String.path()Return the current path.peek()Return the current Token.booleanReturn true if the next value is a null.voidSkip the next value.voidunmappedField(String fieldName) Reading json with an unmapped field, throw an Exception if failOnUnmapped is true.
-
Method Details
-
beginArray
void beginArray()Read array begin. -
endArray
void endArray()Read array end. -
hasNextElement
boolean hasNextElement()Return true if there is a next element. -
beginObject
void beginObject()Read begin object. -
endObject
void endObject()Read end object. -
hasNextField
boolean hasNextField()Return true if there is a next field to be read. -
nextField
Return the next field. -
nextBoolean
boolean nextBoolean()Read and return the next value as a boolean. -
nextInt
int nextInt()Read and return the next value as an int. -
nextLong
long nextLong()Read and return the next value as a long. -
nextDouble
double nextDouble()Read and return the next value as a double. -
nextDecimal
Read and return the next value as a BigDecimal. -
nextBigInteger
Read and return the next value as a BigInteger. -
nextString
Read and return the next value as String. -
peekIsNull
boolean peekIsNull()Return true if the next value is a null. -
nextNull
Return the next value as a null. -
path
Return the current path. -
peek
Return the current Token. -
close
void close()Close the resources of the reader.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
skipValue
void skipValue()Skip the next value. -
unmappedField
Reading json with an unmapped field, throw an Exception if failOnUnmapped is true.
-