MCPcopy Create free account
hub / github.com/Bwar/CJsonObject / Parse

Method Parse

CJsonObject.cpp:504–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504bool CJsonObject::Parse(const std::string& strJson)
505{
506 Clear();
507 m_pJsonData = cJSON_Parse(strJson.c_str(), &mc_pError);
508 m_pKeyTravers = m_pJsonData;
509 if (m_pJsonData == NULL)
510 {
511 m_strErrMsg = std::string("prase json string error at ") + mc_pError;
512 return(false);
513 }
514 return(true);
515}
516
517void CJsonObject::Clear()
518{

Callers 2

GetMethod · 0.80
mainFunction · 0.80

Calls 1

cJSON_ParseFunction · 0.85

Tested by

no test coverage detected