1
0
mirror of https://github.com/json-iterator/go.git synced 2025-05-13 21:36:29 +02:00
json-iterator/any_tests/jsoniter_any_map_test.go
2018-02-13 20:58:29 +08:00

16 lines
376 B
Go

package any_tests
import (
"github.com/stretchr/testify/require"
"testing"
"github.com/json-iterator/go"
)
func Test_wrap_map(t *testing.T) {
should := require.New(t)
any := jsoniter.Wrap(map[string]string{"Field1": "hello"})
should.Equal("hello", any.Get("Field1").ToString())
any = jsoniter.Wrap(map[string]string{"Field1": "hello"})
should.Equal(1, any.Size())
}