美文网首页
go笔记 - json string解析

go笔记 - json string解析

作者: 陈德华 | 来源:发表于2020-10-25 14:41 被阅读0次

目前除了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{}

遍历获取并解析下一层

相关文章

网友评论

      本文标题:go笔记 - json string解析

      本文链接:https://www.haomeiwen.com/subject/rwglpktx.html