| 946 | } |
| 947 | |
| 948 | bool CJsonObject::IsNull(const std::string& strKey) const |
| 949 | { |
| 950 | cJSON* pJsonStruct = NULL; |
| 951 | if (m_pJsonData != NULL) |
| 952 | { |
| 953 | if (m_pJsonData->type == cJSON_Object) |
| 954 | { |
| 955 | pJsonStruct = cJSON_GetObjectItem(m_pJsonData, strKey.c_str()); |
| 956 | } |
| 957 | } |
| 958 | else if (m_pExternJsonDataRef != NULL) |
| 959 | { |
| 960 | if(m_pExternJsonDataRef->type == cJSON_Object) |
| 961 | { |
| 962 | pJsonStruct = cJSON_GetObjectItem(m_pExternJsonDataRef, strKey.c_str()); |
| 963 | } |
| 964 | } |
| 965 | if (pJsonStruct == NULL) |
| 966 | { |
| 967 | return(false); |
| 968 | } |
| 969 | if (pJsonStruct->type != cJSON_NULL) |
| 970 | { |
| 971 | return(false); |
| 972 | } |
| 973 | return(true); |
| 974 | } |
| 975 | |
| 976 | bool CJsonObject::Add(const std::string& strKey, const CJsonObject& oJsonObject) |
| 977 | { |
no test coverage detected