func (n *rootNode) Get(key string) (inner Node) {
	path := n.keyPath(key)
	if err := n.ParseError(); err != nil {
		return &rootNode{
			path: path,
			err:  err,
		}
	}
	if err := n.genMapBuf(); err != nil {
		if err == ErrorNotObject {
			path = n.path  
		}
		inner = &rootNode{
			path: path,
			err: Error{
				Path: "json" + path,
				Err:  err,
			},
		}
	} else if val, ok := n.mapBuf[key]; !ok {
		inner = &rootNode{
			path: path,
			err: Error{
				Path: "json" + path,
				Err:  ErrorUndefined,
			},
		}
	} else {
		val.path = path
		inner = &val
	}
	return
}
Get implements Node
package lzjson
import (
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"regexp"
	"strings"
)
var reNum = regexp.MustCompile(`^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+\-]?\d+)?$`)
func isNumJSON(b []byte) bool {
	return reNum.Match(b)
}
type Node interface {
	Unmarshal(v interface{}) error
	UnmarshalJSON(b []byte) error
	Raw() []byte
	Type() Type
	GetKeys() []string
	Get(key string) (inner Node)
	Len() int
	GetN(nth int) Node
	String() (v string)
	Number() (v float64)
	Int() (v int)
	Bool() (v bool)
	IsNull() bool
	ParseError() error
}
func NewNode() Node {
	return &rootNode{}
}
func Decode(reader io.Reader) Node {
	b, err := ioutil.ReadAll(reader)
	return &rootNode{
		buf: b,
		err: err,
	}
}
type rootNode struct {
	path   string
	buf    []byte
	mapBuf map[string]rootNode
	err    error
}
func (n *rootNode) Unmarshal(v interface{}) error {
	return json.Unmarshal(n.buf, v)
}
func (n *rootNode) UnmarshalJSON(b []byte) error {
	n.buf = b
	n.mapBuf = nil
	return nil
}
func (n *rootNode) Raw() []byte {
	return n.buf
}
func (n rootNode) Type() Type {
	switch {
	case n.err != nil:
		return TypeError
	case n.buf == nil || len(n.buf) == 0:
		return TypeUndefined
	case n.buf[0] == '"':
		return TypeString
	case n.buf[0] == '{':
		return TypeObject
	case n.buf[0] == '[':
		return TypeArray
	case string(n.buf) == "true":
		fallthrough
	case string(n.buf) == "false":
		return TypeBool
	case string(n.buf) == "null":
		return TypeNull
	case isNumJSON(n.buf):
		return TypeNumber
	}
	return TypeError
}
func (n *rootNode) genMapBuf() error {
	if n.Type() != TypeObject {
		return ErrorNotObject
	}
	if n.mapBuf != nil {
		return nil  
	}
	n.mapBuf = map[string]rootNode{}
	return n.Unmarshal(&n.mapBuf)
}
func (n *rootNode) GetKeys() (keys []string) {
	if err := n.genMapBuf(); err != nil {
		return
	}
	keys = make([]string, 0, len(n.mapBuf))
	for key := range n.mapBuf {
		keys = append(keys, key)
	}
	return
}
func (n *rootNode) keyPath(key string) string {
	fmtKey := "." + key
	if strings.IndexAny(key, " /-") >= 0 {
		fmtKey = fmt.Sprintf("[%#v]", key)
	}
	return n.path + fmtKey
}