func WriteJSONStream(v Value, stream *jsoniter.Stream) {
	stream.WriteVal(v.Unstructured())
}
WriteJSONStream writes a value into a JSON stream.
package value
import (
	"bytes"
	"fmt"
	"io"
	"strings"
	jsoniter "github.com/json-iterator/go"
	"gopkg.in/yaml.v2"
)
var (
	readPool  = jsoniter.NewIterator(jsoniter.ConfigCompatibleWithStandardLibrary).Pool()
	writePool = jsoniter.NewStream(jsoniter.ConfigCompatibleWithStandardLibrary, nil, 1024).Pool()
)
type Value interface {
	IsMap() bool
	IsList() bool
	IsBool() bool
	IsInt() bool
	IsFloat() bool
	IsString() bool
	IsNull() bool
	AsMap() Map
	AsMapUsing(Allocator) Map
	AsList() List
	AsListUsing(Allocator) List
	AsBool() bool
	AsInt() int64
	AsFloat() float64
	AsString() string
	Unstructured() interface{}
}
func FromJSON(input []byte) (Value, error) {
	return FromJSONFast(input)
}
func FromJSONFast(input []byte) (Value, error) {
	iter := readPool.BorrowIterator(input)
	defer readPool.ReturnIterator(iter)
	return ReadJSONIter(iter)
}
func ToJSON(v Value) ([]byte, error) {
	buf := bytes.Buffer{}
	stream := writePool.BorrowStream(&buf)
	defer writePool.ReturnStream(stream)
	WriteJSONStream(v, stream)
	b := stream.Buffer()
	err := stream.Flush()
	stream.SetBuffer(b[:0])
	return buf.Bytes(), err
}
func ReadJSONIter(iter *jsoniter.Iterator) (Value, error) {
	v := iter.Read()
	if iter.Error != nil && iter.Error != io.EOF {
		return nil, iter.Error
	}
	return NewValueInterface(v), nil
}