成功了 是 {"resp": {"respCode": "10000","respMsg": "成功","app": {"appId": "xxxxxx"}}}
不成功是 {"resp": {"respCode": "10002","respMsg": "失败","app": “”}}
结构体怎么写,才能兼容接收response的成功和失败
type AutoGenerated struct {
Resp Resp `json:"resp"`
}
type Resp struct {
RespCode string `json:"respCode"`
RespMsg string `json:"respMsg"`
App interface{}`json:"app"`
}
#1
更多评论