| 616 | } |
| 617 | |
| 618 | std::string CJsonObject::ToFormattedString() const |
| 619 | { |
| 620 | char* pJsonString = NULL; |
| 621 | std::string strJsonData = ""; |
| 622 | if (m_pJsonData != NULL) |
| 623 | { |
| 624 | pJsonString = cJSON_Print(m_pJsonData); |
| 625 | } |
| 626 | else if (m_pExternJsonDataRef != NULL) |
| 627 | { |
| 628 | pJsonString = cJSON_Print(m_pExternJsonDataRef); |
| 629 | } |
| 630 | if (pJsonString != NULL) |
| 631 | { |
| 632 | strJsonData = pJsonString; |
| 633 | free(pJsonString); |
| 634 | } |
| 635 | return(strJsonData); |
| 636 | } |
| 637 | |
| 638 | bool CJsonObject::KeyExist(const std::string& strKey) const |
| 639 | { |