jsoniter_any_map_test.go 326 B

1234567891011121314
  1. package jsoniter
  2. import (
  3. "github.com/json-iterator/go/require"
  4. "testing"
  5. )
  6. func Test_wrap_map(t *testing.T) {
  7. should := require.New(t)
  8. any := Wrap(map[string]string{"Field1": "hello"})
  9. should.Equal("hello", any.Get("Field1").ToString())
  10. any = Wrap(map[string]string{"Field1": "hello"})
  11. should.Equal(1, any.Size())
  12. }