class JacksonWriter implements DocumentWriter, ArrayWriter {

    @Override
    public void write(Document document, OutputStream jsonStream) throws IOException {
        try (JsonGenerator jsonGenerator = factory.createGenerator(jsonStream)) {
            configure(jsonGenerator);
            writeDocument(document, jsonGenerator);
        }
    }

    private  JacksonWriter(boolean pretty);

}