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

Method ToFormattedString

CJsonObject.cpp:618–636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

616}
617
618std::string CJsonObject::ToFormattedString() const
619{
620 char* pJsonString = NULL;
621 std::string strJsonData = "";
622 if (m_pJsonData != NULL)
623 {
624 pJsonString = cJSON_Print(m_pJsonData);
625 }
626 else if (m_pExternJsonDataRef != NULL)
627 {
628 pJsonString = cJSON_Print(m_pExternJsonDataRef);
629 }
630 if (pJsonString != NULL)
631 {
632 strJsonData = pJsonString;
633 free(pJsonString);
634 }
635 return(strJsonData);
636}
637
638bool CJsonObject::KeyExist(const std::string& strKey) const
639{

Callers 1

mainFunction · 0.80

Calls 1

cJSON_PrintFunction · 0.85

Tested by

no test coverage detected