@@ -305,7 +305,7 @@ func TestD_MarshalJSON(t *testing.T) {
305305 testcases := []struct {
306306 name string
307307 test D
308- expected interface {}
308+ expected any
309309 }{
310310 {
311311 "nil" ,
@@ -329,21 +329,21 @@ func TestD_MarshalJSON(t *testing.T) {
329329 {"g" , D {{"foo" , "bar" }}},
330330 },
331331 struct {
332- A int `json:"a"`
333- B bool `json:"b"`
334- C string `json:"c"`
335- D interface {} `json:"d"`
336- E float32 `json:"e"`
337- F []interface {} `json:"f"`
338- G map [string ]interface {} `json:"g"`
332+ A int `json:"a"`
333+ B bool `json:"b"`
334+ C string `json:"c"`
335+ D any `json:"d"`
336+ E float32 `json:"e"`
337+ F []any `json:"f"`
338+ G map [string ]any `json:"g"`
339339 }{
340340 A : 42 ,
341341 B : true ,
342342 C : "answer" ,
343343 D : nil ,
344344 E : 2.71828 ,
345- F : []interface {} {42 , true , "answer" , nil , 2.71828 },
346- G : map [string ]interface {} {"foo" : "bar" },
345+ F : []any {42 , true , "answer" , nil , 2.71828 },
346+ G : map [string ]any {"foo" : "bar" },
347347 },
348348 },
349349 }
@@ -400,7 +400,7 @@ func TestD_UnmarshalJSON(t *testing.T) {
400400 {"pi" , 3.142 },
401401 {"boolean" , true },
402402 {"nothing" , nil },
403- {"list" , []interface {} {"hello world" , 3.142 , false , nil , D {{"Lorem" , "ipsum" }}}},
403+ {"list" , []any {"hello world" , 3.142 , false , nil , D {{"Lorem" , "ipsum" }}}},
404404 {"document" , D {{"foo" , "bar" }}},
405405 },
406406 },
@@ -453,7 +453,7 @@ func TestD_UnmarshalJSON(t *testing.T) {
453453 t .Run (tc .name , func (t * testing.T ) {
454454 t .Parallel ()
455455
456- var a map [string ]interface {}
456+ var a map [string ]any
457457 want := json .Unmarshal ([]byte (tc .test ), & a )
458458 var b D
459459 got := json .Unmarshal ([]byte (tc .test ), & b )
0 commit comments