2013年9月17日
摘要: 以前在cocos2d-x项目中用到json解析,集成了libjson库后发现网上提供的解析方法大多是在解析过程中取得值,并没有将解析结果有效的保存起来,于是摸索一番,把解析结果根据数据格式存到数组或字典当中。 不敢独享,代码奉上:using namespace std;void JsonUtil:: parseArrJSON(JSONNODE *n,CCObject **obj){ if (n == NULL) { CCLOG("Invalid JSON Node\n"); return; } bool isAry=false; ... 阅读全文
posted @ 2013-09-17 23:30 PowerAuras 阅读(1932) 评论(1) 推荐(0) 编辑