| 983 | } |
| 984 | |
| 985 | bool CJsonObject::IsNull(const std::string& strKey) const |
| 986 | { |
| 987 | cJSON* pJsonStruct = NULL; |
| 988 | if (m_pJsonData != NULL) |
| 989 | { |
| 990 | if (m_pJsonData->type == cJSON_Object) |
| 991 | { |
| 992 | pJsonStruct = cJSON_GetObjectItem(m_pJsonData, strKey.c_str()); |
| 993 | } |
| 994 | } |
| 995 | else if (m_pExternJsonDataRef != NULL) |
| 996 | { |
| 997 | if(m_pExternJsonDataRef->type == cJSON_Object) |
| 998 | { |
| 999 | pJsonStruct = cJSON_GetObjectItem(m_pExternJsonDataRef, strKey.c_str()); |
| 1000 | } |
| 1001 | } |
| 1002 | if (pJsonStruct == NULL) |
| 1003 | { |
| 1004 | return(false); |
| 1005 | } |
| 1006 | if (pJsonStruct->type != cJSON_NULL) |
| 1007 | { |
| 1008 | return(false); |
| 1009 | } |
| 1010 | return(true); |
| 1011 | } |
| 1012 | |
| 1013 | bool CJsonObject::Add(const std::string& strKey, const CJsonObject& oJsonObject) |
| 1014 | { |
nothing calls this directly
no test coverage detected