24 Star 124 Fork 36

Josin / Exjson

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.c 655 Bytes
一键复制 编辑 原始数据 按行查看 历史
Josin 提交于 2019-05-20 09:26 . Modify Demo
/**
* File:main.c for project exjson.
* Author: Josin
* Email: xeapplee@gmail.com
* Website: https://www.supjos.cn
*/
#include <stdio.h>
#include "exjson.h"
int main(int argc, char *argv[])
{
EXJSON *v = decode_json("{\n"
" \"b\": 100, # 这个是注释\n"
" \"a\":{\n"
" \"a\": \"您好\"\n"
" }\n"
"}");
// 找到a对象里面a的值
char *value = exjson_get_val_from_key(exjson_get_val_from_key(v, "a"), "a");
printf("a:%s", value);
destroy_exjson(v);
return 0;
}
C
1
https://gitee.com/josinli/Exjson.git
git@gitee.com:josinli/Exjson.git
josinli
Exjson
Exjson
master

搜索帮助