12 Star 25 Fork 8

丁宁 / ajson

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
example1_helloworld.cpp 419 Bytes
一键复制 编辑 原始数据 按行查看 历史
丁宁 提交于 2017-06-13 11:11 . update example
#include <iostream>
#include <string>
#include "ajson.hpp"
using namespace std;
using namespace ajson;
struct demo
{
string hello;
string world;
};
AJSON(demo,hello,world)
int main(int argc, char * argv[])
{
char * buff = "{\"hello\" : \"Hello\", \"world\" : \"world.\"}";
demo the_demo;
load_from_buff(the_demo,buff);
cout << the_demo.hello << " " << the_demo.world << std::endl;
cin.get();
return 0;
}
C++
1
https://gitee.com/lordoffox/ajson.git
git@gitee.com:lordoffox/ajson.git
lordoffox
ajson
ajson
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891