我需要将map[string]interface{}其键为json标记名称的转换为struct
type MyStruct struct {
Id string `json:"id"`
Name string `json:"name"`
UserId string `json:"user_id"`
CreatedAt int64 `json:"created_at"`
}
Run Code Online (Sandbox Code Playgroud)
在map[string]interface{}有按键id,name,user_id,created_at。我需要将其转换为struct。
go ×1