docs: @Override
      protected void dispose() {
          try {
              if (generator != null) {
                  generator.writeEndArray();
                  generator.close();
              }
              this.getOutputStream().close();
          } catch (IOException ioe) {
              logger.error("Unable to close stream", ioe);
              logger.trace(ioe.getMessage(), ioe);
          } finally {
              generator = null;
              this.setOutputStream(null);
          }
      }