Get(s string) Json; // field lookup (MapKind)
Elem(i int) Json; // element lookup (ArrayKind)
Len() int; // length (ArrayKind, MapKind)
+ Map() map[string]Json; // map form (MapKind)
}
// JsonToString returns the textual JSON syntax representation
func (*_Null) Get(s string) Json { return Null }
func (*_Null) Elem(int) Json { return Null }
func (*_Null) Len() int { return 0 }
+func (*_Null) Map() map[string]Json { return nil }
type _String struct {
s string;
s += "}";
return s;
}
+func (j *_Map) Map() map[string]Json { return j.m }
// Walk evaluates path relative to the JSON object j.
// Path is taken as a sequence of slash-separated field names
package json
import (
+ "reflect";
"testing";
)
t.Errorf("MapTest: Walk(%#q) => %v, want %v", k, v1, v)
}
}
+ if !reflect.DeepEqual(values, mapv.Map()) {
+ t.Errorf("DeepEqual(values, mapv.Map()) failed")
+ }
}