@Override
    public void endProcessing() {
        try {
            if (jsonGenerator != null) {
                jsonGenerator.close();
                jsonGenerator = null;
            }
        } catch (final IOException | RuntimeException e) {
            fatal(e);
        } finally {
            super.endProcessing();
        }
    }
Called by the pipeline when processing of a file is complete.

@see stroom.pipeline.filter.AbstractXMLFilter#endProcessing()
stroom-pipeline/src/main/java/stroom/pipeline/writer/JSONWriter.java