3 // Copyright 2021 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
13 type A[T any] struct {
24 data := `{"t1":"1","t2":2,"t3":{"t4":4}}`
26 if err := json.Unmarshal([]byte(data), &a1); err != nil {
29 if bytes, err := json.Marshal(&a1); err != nil {
31 } else if string(bytes) != data {