Class JsonDocumentContainer

java.lang.Object
org.frankframework.align.content.JsonDocumentContainer

public class JsonDocumentContainer extends Object
Helper class to construct JSON from XML events.
Author:
Gerrit van Brakel
  • Constructor Details

    • JsonDocumentContainer

      public JsonDocumentContainer(String name, boolean skipArrayElementContainers, boolean skipRootElement)
  • Method Details

    • startElement

      public void startElement(String localName, boolean xmlArrayContainer, boolean repeatedElement, org.apache.xerces.xs.XSTypeDefinition typeDefinition)
    • endElement

      public void endElement()
    • setNull

      public void setNull()
    • setAttribute

      public void setAttribute(String name, String value, org.apache.xerces.xs.XSSimpleTypeDefinition attTypeDefinition)
    • characters

      public void characters(char[] ch, int start, int length)
    • createElementContainer

      protected JsonElementContainer createElementContainer(String localName, boolean xmlArrayContainer, boolean repeatedElement, org.apache.xerces.xs.XSTypeDefinition typeDefinition)
    • addContent

      protected void addContent(JsonElementContainer parent, JsonElementContainer child)
    • toMessage

      public Message toMessage() throws IOException
      Produce a Message with the JSON Document content, using MessageBuilder to reduce memory usage.
      Throws:
      IOException
    • toMessage

      public Message toMessage(boolean indent) throws IOException
      Produce a Message with the JSON Document content, using MessageBuilder to reduce memory usage.
      Throws:
      IOException
    • toWriter

      public void toWriter(Writer writer, boolean indent) throws IOException
      Write JSON document content to the given Writer.
      Parameters:
      writer -
      indent -
      Throws:
      IOException
    • toWriter

      protected void toWriter(Writer w, Object item, int indentLevel) throws IOException
      Throws:
      IOException
    • toString

      @Deprecated public String toString()
      Deprecated.
      Create JSON String representation of the JSON Document. This could use a lot of memory, depending on document size. Be careful with using this, preferably use toMessage().
      Overrides:
      toString in class Object
    • toString

      @Deprecated public String toString(boolean indent)
      Deprecated.
      Create JSON String representation of the JSON Document. This could use a lot of memory, depending on document size. Be careful with using this, preferably use toMessage().
    • getRoot

      public JsonElementContainer getRoot()
    • getName

      public String getName()