You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
bool any
This commit is contained in:
@ -20,6 +20,13 @@ func Test_false(t *testing.T) {
|
||||
should.False(iter.ReadBool())
|
||||
}
|
||||
|
||||
func Test_read_bool_as_any(t *testing.T) {
|
||||
should := require.New(t)
|
||||
any, err := UnmarshalAnyFromString("true")
|
||||
should.Nil(err)
|
||||
should.True(any.ToBool())
|
||||
}
|
||||
|
||||
func Test_write_true_false(t *testing.T) {
|
||||
should := require.New(t)
|
||||
buf := &bytes.Buffer{}
|
||||
|
Reference in New Issue
Block a user