JsonCPP啓用嚴格模式

CStringA strAResponseContent = CW2A(rStrResponseContent);
//啓用嚴格模式,讓非法的json解析時直接返回false,不自動容錯
Json::Reader reader(Json::Features::strictMode());
Json::Value root;
//
if (!reader.parse(strAResponseContent.GetBuffer(), root))
{
	return FALSE;
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章