随笔分类 -  json源码分析

摘要:Json::Value root; Json::Reader reader; reader.parse(str, root); cout << root << endl; //操作json对象 for (auto value : root) { if (value.type() == Json::V 阅读全文
posted @ 2021-01-06 21:50 zwj鹿港小镇 阅读(117) 评论(0) 推荐(0) 编辑
摘要:一、操作如下,可以将json对象转为字符串 Json::Value root; root["name"] = "咸鱼"; root["age"] = 100; string str; Json::FastWriter fast; str = fast.write(root); cout << str 阅读全文
posted @ 2021-01-06 00:29 zwj鹿港小镇 阅读(2151) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示