You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-27 23:18:42 +02:00
#61 removed internal buffer from lazy array and object; jsoniter.Get replaced jsoniter.UnmarshalAny
This commit is contained in:
@ -8,8 +8,7 @@ import (
|
||||
|
||||
func Test_read_int64_as_any(t *testing.T) {
|
||||
should := require.New(t)
|
||||
any, err := UnmarshalAnyFromString("1234")
|
||||
should.Nil(err)
|
||||
any := Get([]byte("1234"))
|
||||
should.Equal(1234, any.ToInt())
|
||||
should.Equal(io.EOF, any.LastError())
|
||||
should.Equal("1234", any.ToString())
|
||||
@ -18,7 +17,6 @@ func Test_read_int64_as_any(t *testing.T) {
|
||||
|
||||
func Test_int_lazy_any_get(t *testing.T) {
|
||||
should := require.New(t)
|
||||
any, err := UnmarshalAnyFromString("1234")
|
||||
should.Nil(err)
|
||||
any := Get([]byte("1234"))
|
||||
should.Equal(Invalid, any.Get(1, "2").ValueType())
|
||||
}
|
||||
|
Reference in New Issue
Block a user