目前除了go原生的json以外,还使用了三种json
一、https://github.com/json-iterator/go
使用文档:http://jsoniter.com/migrate-from-go-std.html
二、https://github.com/buger/jsonparser
三、https://github.com/bitly/go-simplejson
如果层次比较深且字段比较多,遍历还是比较麻烦
使用Get获取下一层的字段数据,如 data.Get("children").Array()转成map[]interface{}
遍历获取并解析下一层
网友评论