You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
fix any
This commit is contained in:
@ -28,9 +28,9 @@ func Test_read_map_of_interface(t *testing.T) {
|
||||
|
||||
func Test_read_map_of_any(t *testing.T) {
|
||||
iter := ParseString(`{"hello": "world"}`)
|
||||
m := map[string]Any{"1": any("2")}
|
||||
m := map[string]Any{"1": *MakeAny("2")}
|
||||
iter.Read(&m)
|
||||
if !reflect.DeepEqual(map[string]Any{"1": any("2"), "hello": any("world")}, m) {
|
||||
if !reflect.DeepEqual(map[string]Any{"1": *MakeAny("2"), "hello": *MakeAny("world")}, m) {
|
||||
fmt.Println(iter.Error)
|
||||
t.Fatal(m)
|
||||
}
|
||||
|
Reference in New Issue
Block a user