MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / ToFormattedString

Method ToFormattedString

common/map_sdk/transmission/src/CJsonObject.cpp:327–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327std::string CJsonObject::ToFormattedString() const {
328 char* pJsonString = NULL;
329 std::string strJsonData = "";
330 if (m_pJsonData != NULL) {
331 pJsonString = cJSON_Print(m_pJsonData);
332 } else if (m_pExternJsonDataRef != NULL) {
333 pJsonString = cJSON_Print(m_pExternJsonDataRef);
334 }
335 if (pJsonString != NULL) {
336 strJsonData = pJsonString;
337 free(pJsonString);
338 }
339 return (strJsonData);
340}
341
342bool CJsonObject::Get(const std::string& strKey, CJsonObject& oJsonObject) const {
343 cJSON* pJsonStruct = NULL;

Callers

nothing calls this directly

Calls 1

cJSON_PrintFunction · 0.85

Tested by

no test coverage detected