String类型转json格式
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json

·
拿到下面这种格式的数据,我们是无法直接用的需要转化一下
1.String类型转json格式
通过JSON.parse进行转换如下:
const goosid = JSON.parse(curid.bookIds)
最终得到下图数据:
2.把json转换成String型
通过JSON.stringify进行转换如下
const good = JSON.stringify(goosid)
最终得到下图数据:




适用于现代 C++ 的 JSON。
最近提交(Master分支:6 个月前 )
51a77f1d
2 天前
756ca22e
2 天前
更多推荐
所有评论(0)