Package org.bson.json

Class JsonWriter

    • Constructor Detail

      • JsonWriter

        public JsonWriter​(Writer writer)
        Creates a new instance which uses writer to write JSON to.
        Parameters:
        writer - the writer to write JSON to.
      • JsonWriter

        public JsonWriter​(Writer writer,
                          JsonWriterSettings settings)
        Creates a new instance which uses writer to write JSON to and uses the given settings.
        Parameters:
        writer - the writer to write JSON to.
        settings - the settings to apply to this writer.
    • Method Detail

      • getWriter

        public Writer getWriter()
        Gets the Writer.
        Returns:
        the writer
      • doWriteBoolean

        public void doWriteBoolean​(boolean value)
      • doWriteNull

        public void doWriteNull()
      • doWriteObjectId

        public void doWriteObjectId​(ObjectId objectId)
      • doWriteRegularExpression

        public void doWriteRegularExpression​(BsonRegularExpression regularExpression)
      • doWriteString

        public void doWriteString​(String value)
      • doWriteSymbol

        public void doWriteSymbol​(String value)
      • doWriteTimestamp

        public void doWriteTimestamp​(BsonTimestamp value)
      • doWriteUndefined

        public void doWriteUndefined()
      • flush

        public void flush()
        Description copied from interface: BsonWriter
        Flushes any pending data to the output destination.