jsoniter_any_bool_test.go 239 B

12345678910111213
  1. package jsoniter
  2. import (
  3. "testing"
  4. "github.com/json-iterator/go/require"
  5. )
  6. func Test_read_bool_as_any(t *testing.T) {
  7. should := require.New(t)
  8. any, err := UnmarshalAnyFromString("true")
  9. should.Nil(err)
  10. should.True(any.ToBool())
  11. }