mirror of
https://github.com/json-iterator/go.git
synced 2024-11-27 08:30:57 +02:00
19 lines
288 B
Go
19 lines
288 B
Go
package test
|
|
|
|
func init() {
|
|
marshalCases = append(marshalCases,
|
|
map[string]interface{}{"abc": 1},
|
|
map[string]MyInterface{"hello": MyString("world")},
|
|
)
|
|
}
|
|
|
|
type MyInterface interface {
|
|
Hello() string
|
|
}
|
|
|
|
type MyString string
|
|
|
|
func (ms MyString) Hello() string {
|
|
return string(ms)
|
|
}
|