Package org.bson.json

Class JsonReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, BsonReader

    @Deprecated(since="2022-10-31")
    public class JsonReader
    extends AbstractBsonReader
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    Reads a JSON in one of the following modes:
    • Strict mode that conforms to the JSON RFC specifications.
    • JavaScript mode that that most JavaScript interpreters can process
    • Shell mode that the mongo shell can process. This is also called "extended" JavaScript format.
    For more information about this modes please see http://docs.mongodb.org/manual/reference/mongodb-extended-json/
    Since:
    3.0
    • Constructor Detail

      • JsonReader

        public JsonReader​(java.lang.String json)
        Deprecated.
        Constructs a new instance with the given string positioned at a JSON object.
        Parameters:
        json - A string representation of a JSON object.
      • JsonReader

        public JsonReader​(java.io.Reader reader)
        Deprecated.
        Constructs a new instance with the given Reader positioned at a JSON object.

        The application is responsible for closing the Reader.

        Parameters:
        reader - A reader representation of a JSON object.
        Since:
        3.11
    • Method Detail

      • doReadDecimal128

        public Decimal128 doReadDecimal128()
        Deprecated.
      • mark

        @Deprecated
        public void mark()
        Deprecated.
        Description copied from interface: BsonReader
        Creates a bookmark in the BsonReader's input The previous mark must be cleared before creating a new one
      • getMark

        public BsonReaderMark getMark()
        Deprecated.
        Description copied from interface: BsonReader
        Gets a mark representing the current state of the reader.
        Returns:
        the mark
      • reset

        @Deprecated
        public void reset()
        Deprecated.
        Description copied from interface: BsonReader
        Go back to the state at the last mark and removes the mark