code: protected final void _writeAndClose(Object value, JsonGenerator g)
          throws IOException
      {
          boolean closed = false;
          try {
              _config(g);
              _writerForOperation(g).writeValue(value);
              closed = true;
              g.close();
          } finally {
              if (!closed) {
                  // need to catch possible failure, so as not to mask problem
                  try {
                      g.close();
                  } catch (IOException ioe) { }
              }
          }
      }
docs: /*
  ********************************************************************
  /* Internal methods, writing
  ********************************************************************