Class JSONObjectReader

java.lang.Object
com.unboundid.util.json.JSONObjectReader
All Implemented Interfaces:
Closeable, AutoCloseable

@ThreadSafety(level=NOT_THREADSAFE) public final class JSONObjectReader extends Object implements Closeable
This class provides a mechanism for reading JSON objects from an input stream. It assumes that any non-ASCII data that may be read from the input stream is encoded as UTF-8.
  • Constructor Details

    • JSONObjectReader

      public JSONObjectReader(@NotNull InputStream inputStream)
      Creates a new JSON object reader that will read objects from the provided input stream.
      Parameters:
      inputStream - The input stream from which the data should be read.
    • JSONObjectReader

      public JSONObjectReader(@NotNull InputStream inputStream, boolean bufferInputStream)
      Creates a new JSON object reader that will read objects from the provided input stream.
      Parameters:
      inputStream - The input stream from which the data should be read.
      bufferInputStream - Indicates whether to buffer the input stream. This should be false if the input stream could be used for any purpose other than reading JSON objects after one or more objects are read.
  • Method Details