func (mr *stackReader) Insert(r io.Reader) {
	if isEmpty(r) {
		return
	}
	rr, ok := r.(reader)
	if !ok {
		rr = bufio.NewReader(r)
	}
	mr.readers = append(mr.readers, rr)
}
Insert reader in front of the queue. If the reader does not
implement io.ByteReader, it will be wrapped in a bufio.Reader.
package jsonarray
import (
	"bufio"
	"bytes"
	"io"
)
type reader interface {
	io.Reader
	io.ByteReader
}
type stackReader struct {
	readers []reader
}
var _ = io.Reader(&stackReader{})
var _ = io.ByteReader(&stackReader{})
func (mr *stackReader) Read(p []byte) (n int, err error) {
	for len(mr.readers) > 0 {
		n, err = mr.readers[len(mr.readers)-1].Read(p)
		if err == io.EOF || isEmpty(mr.readers[len(mr.readers)-1]) {
			mr.readers = mr.readers[:len(mr.readers)-1]
		}
		if n > 0 || err != io.EOF {
			if err == io.EOF {
				err = nil
			}
			return n, err
		}
	}
	return 0, io.EOF
}
func (mr *stackReader) ReadByte() (c byte, err error) {
	for len(mr.readers) > 0 {
		c, err = mr.readers[len(mr.readers)-1].ReadByte()
		if err == io.EOF {
			mr.readers = mr.readers[:len(mr.readers)-1]
			continue
		}
		return c, err
	}
	return 0, io.EOF
}
func isEmpty(r io.Reader) bool {
	if br, ok := r.(*bytes.Reader); ok {
		if br.Len() == 0 {
			return true
		}
	}
	return false
}