| 596 | } |
| 597 | |
| 598 | std::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 | |
| 618 | std::string CJsonObject::ToFormattedString() const |
| 619 | { |
no test coverage detected