Class StrictJsonDocumentWriter

java.lang.Object
org.frankframework.mongodb.StrictJsonDocumentWriter
All Implemented Interfaces:
org.bson.json.StrictJsonWriter

public class StrictJsonDocumentWriter extends Object implements org.bson.json.StrictJsonWriter
StrictJsonWriter to write to FF DocumentBuilder, to generate JSON or XML. Based on org.bson.json.StrictCharacterStreamJsonWriter.
Author:
Gerrit van Brakel
  • Constructor Details

    • StrictJsonDocumentWriter

      public StrictJsonDocumentWriter(INodeBuilder nodeBuilder, org.bson.json.StrictCharacterStreamJsonWriterSettings settings)
      Construct an instance.
      Parameters:
      nodeBuilder - the handler to write JSON to.
      settings - the settings to apply to this writer.
  • Method Details

    • getCurrentLength

      public int getCurrentLength()
      Gets the current length of the JSON text.
      Returns:
      the current length of the JSON text
    • writeName

      public void writeName(String name)
      Specified by:
      writeName in interface org.bson.json.StrictJsonWriter
    • writeStartObject

      public void writeStartObject()
      Specified by:
      writeStartObject in interface org.bson.json.StrictJsonWriter
    • writeStartObject

      public void writeStartObject(String name)
      Specified by:
      writeStartObject in interface org.bson.json.StrictJsonWriter
    • writeEndObject

      public void writeEndObject()
      Specified by:
      writeEndObject in interface org.bson.json.StrictJsonWriter
    • writeStartArray

      public void writeStartArray()
      Specified by:
      writeStartArray in interface org.bson.json.StrictJsonWriter
    • writeStartArray

      public void writeStartArray(String name)
      Specified by:
      writeStartArray in interface org.bson.json.StrictJsonWriter
    • writeEndArray

      public void writeEndArray()
      Specified by:
      writeEndArray in interface org.bson.json.StrictJsonWriter
    • writeBoolean

      public void writeBoolean(boolean value)
      Specified by:
      writeBoolean in interface org.bson.json.StrictJsonWriter
    • writeBoolean

      public void writeBoolean(String name, boolean value)
      Specified by:
      writeBoolean in interface org.bson.json.StrictJsonWriter
    • writeNumber

      public void writeNumber(String value)
      Specified by:
      writeNumber in interface org.bson.json.StrictJsonWriter
    • writeNumber

      public void writeNumber(String name, String value)
      Specified by:
      writeNumber in interface org.bson.json.StrictJsonWriter
    • writeString

      public void writeString(String value)
      Specified by:
      writeString in interface org.bson.json.StrictJsonWriter
    • writeString

      public void writeString(String name, String value)
      Specified by:
      writeString in interface org.bson.json.StrictJsonWriter
    • writeRaw

      public void writeRaw(String value)
      Specified by:
      writeRaw in interface org.bson.json.StrictJsonWriter
    • writeRaw

      public void writeRaw(String name, String value)
      Specified by:
      writeRaw in interface org.bson.json.StrictJsonWriter
    • writeNull

      public void writeNull()
      Specified by:
      writeNull in interface org.bson.json.StrictJsonWriter
    • writeNull

      public void writeNull(String name)
      Specified by:
      writeNull in interface org.bson.json.StrictJsonWriter
    • isTruncated

      public boolean isTruncated()
      Return true if the output has been truncated due to exceeding the length specified in StrictCharacterStreamJsonWriterSettings.getMaxLength().
      Specified by:
      isTruncated in interface org.bson.json.StrictJsonWriter
      Returns:
      true if the output has been truncated
      Since:
      3.7
      See Also:
      • StrictCharacterStreamJsonWriterSettings.getMaxLength()