1 Star 9 Fork 2

linuxmail/lib-zjson

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
serialize_pretty_test.cpp 565 Bytes
一键复制 编辑 原始数据 按行查看 历史
xxx 提交于 2022-12-09 14:23 +08:00 . 序列化支持美化
/*
* ================================
* eli960@qq.com
* http://linuxmail.cn/
* 2022-12-19
* ================================
*/
#include "zcc_json.h"
int main(int argc, char **argv)
{
if (argc < 2)
{
printf("USAGE: %s json_file\n", argv[0]);
return 1;
}
std::string con;
zcc::json js;
if (!js.load_from_pathname(argv[1]))
{
printf("ERR load json from %s(%m)\n", argv[1]);
return 1;
}
js.serialize(con, zcc::json_serialize_pretty);
printf("JSON:\n%s\n", con.c_str());
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/linuxmail/lib-zjson.git
git@gitee.com:linuxmail/lib-zjson.git
linuxmail
lib-zjson
lib-zjson
master

搜索帮助