| 649 | } |
| 650 | |
| 651 | bool CJsonObject::KeyExist(const std::string& strKey) const |
| 652 | { |
| 653 | cJSON* pJsonStruct = NULL; |
| 654 | if (m_pJsonData != NULL) |
| 655 | { |
| 656 | if (m_pJsonData->type == cJSON_Object) |
| 657 | { |
| 658 | pJsonStruct = cJSON_GetObjectItem(m_pJsonData, strKey.c_str()); |
| 659 | } |
| 660 | } |
| 661 | else if (m_pExternJsonDataRef != NULL) |
| 662 | { |
| 663 | if(m_pExternJsonDataRef->type == cJSON_Object) |
| 664 | { |
| 665 | pJsonStruct = cJSON_GetObjectItem(m_pExternJsonDataRef, strKey.c_str()); |
| 666 | } |
| 667 | } |
| 668 | if (pJsonStruct == NULL) |
| 669 | { |
| 670 | return(false); |
| 671 | } |
| 672 | return(true); |
| 673 | } |
| 674 | |
| 675 | bool CJsonObject::Get(const std::string& strKey, CJsonObject& oJsonObject) const |
| 676 | { |
nothing calls this directly
no test coverage detected