func (e *StreamEncoder) Close() error {
	if !e.closed {
		if err := e.Open(-1); err != nil {
			return err
		}

		e.closed = true

		if !e.oneshot {
			e.err = e.Emitter.EmitArrayEnd()
		}
	}

	return e.err
}
func (e *StreamEncoder) Close() error {
	if !e.closed {
		if err := e.Open(-1); err != nil {
			return err
		}

		e.closed = true

		if !e.oneshot {
			e.err = e.Emitter.EmitArrayEnd()
		}
	}

	return e.err
}
func ( e * StreamEncoder ) Close ( ) error { if ! e . closed { if err := e . Open ( - 1 ) ; err != nil { return err } e . closed = true if ! e . oneshot { e . err = e . Emitter . EmitArrayEnd ( ) } } return e . err }
// Close terminates the stream encoder.
Close terminates the stream encoder .