You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
suport encode interface
This commit is contained in:
@ -152,7 +152,9 @@ func Test_object_lazy_any_set(t *testing.T) {
|
||||
any, err := UnmarshalAnyFromString(`{"a":{"b":{"c":"d"}}}`)
|
||||
should.Nil(err)
|
||||
any.GetObject()["a"] = WrapInt64(1)
|
||||
should.Equal(`{"a":1}`, any.ToString())
|
||||
str, err := MarshalToString(any)
|
||||
should.Nil(err)
|
||||
should.Equal(`{"a":1}`, str)
|
||||
}
|
||||
|
||||
func Test_write_object(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user