随笔分类 -  JSON

摘要:下面,对my.json中grade和name的第一个元素进行修改 toObject()、toArray()都会开辟新内存,这是我们认为改了,但是没有生效的原因所在。即在新内存上改了之后,需重新赋回旧内存。 核心代码:三板斧【一路to过去】【改】【一路赋回】 // 获取根 { } QJsonObjec 阅读全文
posted @ 2023-02-27 16:22 夕西行 阅读(896) 评论(0) 推荐(0) 编辑
摘要:官网:Releases · nlohmann/json (github.com) #include <iostream> #include "nlohmann/json.hpp" #include <fstream> using json = nlohmann::json; int main() { 阅读全文
posted @ 2023-02-21 10:21 夕西行 阅读(1938) 评论(0) 推荐(0) 编辑

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