Modern C++ JSON nlohmann::json 使用详解

git repo:https://github.com/nlohmann/json

nlohmann::json只需要一个头文件json.hpp, 不需要编译成lib, 直接放到项目中即可使用

下载json.hpp

在右侧找到release
在这里插入图片描述
点击进去后,下载json.hpp即可
在这里插入图片描述

代码示例

例如下面代码

/*

modern c++ json test

*/

#include <iostream>
#include "json.hpp"


猜你喜欢

转载自blog.csdn.net/yao_hou/article/details/124966627