根据业务场景需要,API接口可能需要对一个map类型的数据进行json序列化返回给前端,当map中的key过多时,也是需要分页的。如何实现?
Deomo代码:
var data []map[string]string
type Res struct {
Total int `json:"total"`
List []
根据业务场景需要,API接口可能需要对一个map类型的数据进行json序列化返回给前端,当map中的key过多时,也是需要分页的。如何实现?
Deomo代码:
var data []map[string]string
type Res struct {
Total int `json:"total"`
List []