| 325 | } |
| 326 | |
| 327 | std::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 | |
| 342 | bool CJsonObject::Get(const std::string& strKey, CJsonObject& oJsonObject) const { |
| 343 | cJSON* pJsonStruct = NULL; |
nothing calls this directly
no test coverage detected