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

Method ToString

CJsonObject.cpp:598–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

596}
597
598std::string CJsonObject::ToString() const
599{
600 char* pJsonString = NULL;
601 std::string strJsonData = "";
602 if (m_pJsonData != NULL)
603 {
604 pJsonString = cJSON_PrintUnformatted(m_pJsonData);
605 }
606 else if (m_pExternJsonDataRef != NULL)
607 {
608 pJsonString = cJSON_PrintUnformatted(m_pExternJsonDataRef);
609 }
610 if (pJsonString != NULL)
611 {
612 strJsonData = pJsonString;
613 free(pJsonString);
614 }
615 return(strJsonData);
616}
617
618std::string CJsonObject::ToFormattedString() const
619{

Callers 7

operator==Method · 0.95
CJsonObjectMethod · 0.80
CJsonObject.cppFile · 0.80
AddMethod · 0.80
ReplaceMethod · 0.80
AddAsFirstMethod · 0.80
mainFunction · 0.80

Calls 1

cJSON_PrintUnformattedFunction · 0.85

Tested by

no test coverage detected