| 609 | } |
| 610 | |
| 611 | std::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 | |
| 631 | std::string CJsonObject::ToFormattedString() const |
| 632 | { |
no test coverage detected