MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / ToString

Method ToString

eval/LANE_evaluation/lane2d/src/CJsonObject.cpp:611–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609}
610
611std::string CJsonObject::ToString() const
612{
613 char* pJsonString = NULL;
614 std::string strJsonData = "";
615 if (m_pJsonData != NULL)
616 {
617 pJsonString = cJSON_PrintUnformatted(m_pJsonData);
618 }
619 else if (m_pExternJsonDataRef != NULL)
620 {
621 pJsonString = cJSON_PrintUnformatted(m_pExternJsonDataRef);
622 }
623 if (pJsonString != NULL)
624 {
625 strJsonData = pJsonString;
626 free(pJsonString);
627 }
628 return(strJsonData);
629}
630
631std::string CJsonObject::ToFormattedString() const
632{

Callers 6

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

Calls 1

cJSON_PrintUnformattedFunction · 0.85

Tested by

no test coverage detected