You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
support map of interface{}
This commit is contained in:
@ -147,6 +147,14 @@ func Test_object_lazy_any_get(t *testing.T) {
|
||||
should.Equal("d", any.Get("a", "b", "c").ToString())
|
||||
}
|
||||
|
||||
func Test_object_lazy_any_set(t *testing.T) {
|
||||
should := require.New(t)
|
||||
any, err := UnmarshalAnyFromString(`{"a":{"b":{"c":"d"}}}`)
|
||||
should.Nil(err)
|
||||
any.GetObject()["a"] = WrapInt64(1)
|
||||
should.Equal(`{"a":1}`, any.ToString())
|
||||
}
|
||||
|
||||
func Test_write_object(t *testing.T) {
|
||||
should := require.New(t)
|
||||
buf := &bytes.Buffer{}
|
||||
|
Reference in New Issue
Block a user