cocos2dx 2.2.2 如何解析cocostudio导出来的json

rapidjson::Document _doc;

//bool bRet = false; 
unsigned long size = 0; 
unsigned char *pBytes = NULL; 
do { 
    pBytes = cocos2d::CCFileUtils::sharedFileUtils()->getFileData("layerMap.json", "r", &size); 
    CC_BREAK_IF(pBytes == NULL || strcmp((char*)pBytes, "") == 0); 
    std::string load_str((const char*)pBytes, size); 
    CC_SAFE_DELETE_ARRAY(pBytes); 


    _doc.Parse<0>(load_str.c_str());////////////////////////////_doc.Parse这一个函数是解析方法,解析后,其中_doc是 rapidjson::Document _doc;类型的一个全局变量 


    CC_BREAK_IF(_doc.HasParseError()); 
    //bRet = true; 
} while (0); 

CCLOG("%d",DICTOOL->getIntValue_json(_doc,"layer"));

上面的代码一执行到CCLog就会报错啊
谁可以提供一个完整的解析例子啊

rapidjson::Document _doc;
//bool bRet = false; 
unsigned long size = 0; 
unsigned char *pBytes = NULL; 
do { 
    pBytes = cocos2d::CCFileUtils::sharedFileUtils()->getFileData("layerMap.json", "r", &size); 
    CC_BREAK_IF(pBytes == NULL || strcmp((char*)pBytes, "") == 0); 
    std::string load_str((const char*)pBytes, size); 
    CC_SAFE_DELETE_ARRAY(pBytes); 


    _doc.Parse<0>(load_str.c_str());////////////////////////////_doc.Parse这一个函数是解析方法,解析后,其中_doc是 rapidjson::Document _doc;类型的一个全局变量 


    CC_BREAK_IF(_doc.HasParseError()); 
    //bRet = true; 
} while (0); 

CCLOG("%d",DICTOOL->getIntValue_json(_doc,"layer"));

:14: :14: :14: :14: :14: :14: :14:

楼主您好,这个layer是否是整形呢?如果不是整形,则错误应该在getIntValue_json()方法上

我解决了 还写了一个博客

http://blog.csdn.net/faweideniu/article/details/20290151

为何不来论坛分享下呢?
:7: