Class AutoArrayTarget
java.lang.Object
org.apache.synapse.commons.staxon.core.json.stream.util.AutoArrayTarget
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,JsonStreamTarget
Target filter to auto-insert array boundaries.
Note: this class caches all events and flushes to the
underlying target after receiving the last close-object
event, which may cause memory issues for large documents.
Also, auto-recognition of array boundaries never creates
arrays with a single element.
It is recommended to handle array boundaries via the
JsonXMLStreamWriter.writeStartArray(String) and
JsonXMLStreamWriter.writeEndArray() methods
or by producing <?xml-muliple ...?>
processing instructions.-
Constructor Details
-
AutoArrayTarget
-
-
Method Details
-
name
Description copied from interface:JsonStreamTargetWrite name.- Specified by:
namein interfaceJsonStreamTarget- Parameters:
name-- Throws:
IOException
-
value
Description copied from interface:JsonStreamTargetWrite value.- Specified by:
valuein interfaceJsonStreamTarget- Parameters:
value-- Throws:
IOException
-
startObject
Description copied from interface:JsonStreamTargetStart object- Specified by:
startObjectin interfaceJsonStreamTarget- Throws:
IOException
-
endObject
Description copied from interface:JsonStreamTargetEnd object.- Specified by:
endObjectin interfaceJsonStreamTarget- Throws:
IOException
-
startArray
Description copied from interface:JsonStreamTargetStart array.- Specified by:
startArrayin interfaceJsonStreamTarget- Throws:
IOException
-
endArray
Description copied from interface:JsonStreamTargetEnd array.- Specified by:
endArrayin interfaceJsonStreamTarget- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Throws:
IOException
-