Interface JsonReader

All Superinterfaces:
AutoCloseable, Closeable

public interface JsonReader extends Closeable
Reads json content as a stream of JSON tokens and content.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    A structure, name, or value type in a JSON-encoded string.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Read array begin.
    void
    Read begin object.
    void
    Close the resources of the reader.
    void
    Read array end.
    void
    Read end object.
    boolean
    Return true if there is a next element.
    boolean
    Return true if there is a next field to be read.
    Read and return the next value as a BigInteger.
    boolean
    Read and return the next value as a boolean.
    Read and return the next value as a BigDecimal.
    double
    Read and return the next value as a double.
    Return the next field.
    int
    Read and return the next value as an int.
    long
    Read and return the next value as a long.
    <T> T
    Return the next value as a null.
    Read and return the next value as String.
    Return the current path.
    Return the current Token.
    boolean
    Return true if the next value is a null.
    void
    Skip the next value.
    void
    unmappedField(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

      <T> T 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:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • skipValue

      void skipValue()
      Skip the next value.
    • unmappedField

      void unmappedField(String fieldName)
      Reading json with an unmapped field, throw an Exception if failOnUnmapped is true.