func (p *Document) MarshalJSON() (b []byte, err error) {
	vars, err := p.Vars()
	if err != nil {
		return
	}
	return json.Marshal(vars)
}
MarshalJSON is required by json.Marshal.
package bson
import (
	"bufio"
	"encoding/binary"
	"encoding/json"
	"io"
	"reflect"
	"gopkg.in/mgo.v2/bson"
	"github.com/qiniu/bpl"
)
func peekInt32(in *bufio.Reader) (v int32, err error) {
	t, err := in.Peek(4)
	if err != nil {
		return
	}
	v = int32(binary.LittleEndian.Uint32(t))
	return
}
type Document struct {
	data  []byte
	cache map[string]interface{}
}