相关疑难解决方法(0)

一个字段的Golang多个json标记名称

在Golang中可以为JSON结构标记使用多个名称吗?

type Animation struct {
    Name    string  `json:"name"`
    Repeat  int     `json:"repeat"`
    Speed   uint    `json:"speed"`
    Pattern Pattern `json:"pattern",json:"frames"`
}
Run Code Online (Sandbox Code Playgroud)

tags json struct go

8
推荐指数
2
解决办法
7696
查看次数

标签 统计

go ×1

json ×1

struct ×1

tags ×1