java.lang.Object
org.apache.synapse.commons.staxon.core.json.stream.util.AutoArrayTarget
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, JsonStreamTarget

public class AutoArrayTarget extends Object implements 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.