Package org.frankframework.align.content
Class JsonDocumentContainer
java.lang.Object
org.frankframework.align.content.JsonDocumentContainer
Helper class to construct JSON from XML events.
- Author:
- Gerrit van Brakel
-
Constructor Summary
ConstructorsConstructorDescriptionJsonDocumentContainer
(String name, boolean skipArrayElementContainers, boolean skipRootElement) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addContent
(JsonElementContainer parent, JsonElementContainer child) void
characters
(char[] ch, int start, int length) protected JsonElementContainer
createElementContainer
(String localName, boolean xmlArrayContainer, boolean repeatedElement, org.apache.xerces.xs.XSTypeDefinition typeDefinition) void
getName()
getRoot()
void
setAttribute
(String name, String value, org.apache.xerces.xs.XSSimpleTypeDefinition attTypeDefinition) void
setNull()
void
startElement
(String localName, boolean xmlArrayContainer, boolean repeatedElement, org.apache.xerces.xs.XSTypeDefinition typeDefinition) Produce aMessage
with the JSON Document content, usingMessageBuilder
to reduce memory usage.toMessage
(boolean indent) Produce aMessage
with the JSON Document content, usingMessageBuilder
to reduce memory usage.toString()
Deprecated.toString
(boolean indent) Deprecated.void
Write JSON document content to the givenWriter
.protected void
-
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
-
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
-
toMessage
Produce aMessage
with the JSON Document content, usingMessageBuilder
to reduce memory usage.- Throws:
IOException
-
toMessage
Produce aMessage
with the JSON Document content, usingMessageBuilder
to reduce memory usage.- Throws:
IOException
-
toWriter
Write JSON document content to the givenWriter
.- Parameters:
writer
-indent
-- Throws:
IOException
-
toWriter
- Throws:
IOException
-
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 usetoMessage()
. -
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 usetoMessage()
. -
getRoot
-
getName
-