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

Method ToFormattedString

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

Source from the content-addressed store, hash-verified

629}
630
631std::string CJsonObject::ToFormattedString() const
632{
633 char* pJsonString = NULL;
634 std::string strJsonData = "";
635 if (m_pJsonData != NULL)
636 {
637 pJsonString = cJSON_Print(m_pJsonData);
638 }
639 else if (m_pExternJsonDataRef != NULL)
640 {
641 pJsonString = cJSON_Print(m_pExternJsonDataRef);
642 }
643 if (pJsonString != NULL)
644 {
645 strJsonData = pJsonString;
646 free(pJsonString);
647 }
648 return(strJsonData);
649}
650
651bool CJsonObject::KeyExist(const std::string& strKey) const
652{

Callers

nothing calls this directly

Calls 1

cJSON_PrintFunction · 0.85

Tested by

no test coverage detected