@Override
        public void endDocument(ContentHandler contentHandler, Metadata metadata) throws SAXException {
            endEmbeddedDocument(contentHandler, metadata);
        }
This uses the {@link JsonStreamingSerializer} to write out a
single metadata object at a time.
tika-batch/src/main/java/org/apache/tika/batch/fs/StreamOutRPWFSConsumer.java