Class Stream2JSONInputStream

All Implemented Interfaces:
Closeable, AutoCloseable, JSONInputStream

@NonNullByDefault public class Stream2JSONInputStream extends InputStream implements JSONInputStream
This InputStream will stream Streams as JSON one item at a time. This will reduce memory usage when streaming large collections through the REST interface. The input stream creates one JSON representation at a time from the top level elements of the stream. For best performance a flattened stream should be provided. Otherwise a nested collections JSON representation will be fully transformed into memory.
Henning Treu - Initial contribution, Jörg Sautter - Use as SequenceInputStream to simplify the logic