Package org.bson.json

Class JsonWriter

All Implemented Interfaces:
Closeable, AutoCloseable, BsonWriter

@Deprecated(since="2022-10-31") public class JsonWriter extends AbstractBsonWriter
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A BsonWriter implementation that outputs a JSON representation of BSON.
Since:
3.0
  • Constructor Details

    • JsonWriter

      public JsonWriter(Writer writer)
      Deprecated.
      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)
      Deprecated.
      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 Details

    • getWriter

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

      public void doWriteBoolean(boolean value)
      Deprecated.
    • doWriteNull

      public void doWriteNull()
      Deprecated.
    • doWriteObjectId

      public void doWriteObjectId(ObjectId objectId)
      Deprecated.
    • doWriteRegularExpression

      public void doWriteRegularExpression(BsonRegularExpression regularExpression)
      Deprecated.
    • doWriteString

      public void doWriteString(String value)
      Deprecated.
    • doWriteSymbol

      public void doWriteSymbol(String value)
      Deprecated.
    • doWriteTimestamp

      public void doWriteTimestamp(BsonTimestamp value)
      Deprecated.
    • doWriteUndefined

      public void doWriteUndefined()
      Deprecated.
    • flush

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

      public boolean isTruncated()
      Deprecated.
      Return true if the output has been truncated due to exceeding the length specified in JsonWriterSettings.maxLength.
      Returns:
      true if the output has been truncated
      Since:
      3.7
      See Also:
      • JsonWriterSettings.maxLength