first "Set" a json object into a new json object, and then the new json object "Get" the json out is error.because is the json address.
func (j *Json) Get(key string) *Json {
m, err := j.Map()
if err == nil {
if val, ok := m[key]; ok {
/////this may be used
if reflect.TypeOf(val).Kind() == reflect.Ptr {
if reflect.TypeOf(val).Elem().String() == "simplejson.Json"{
return val.(*Json)
}else{
return &Json{nil}
}
}
return &Json{val}
}
}
return &Json{nil}
}
first "Set" a json object into a new json object, and then the new json object "Get" the json out is error.because is the json address.