| 959 | } |
| 960 | |
| 961 | int CJsonObject::GetValueType(const std::string& strKey) const |
| 962 | { |
| 963 | cJSON* pJsonStruct = NULL; |
| 964 | if (m_pJsonData != NULL) |
| 965 | { |
| 966 | if (m_pJsonData->type == cJSON_Object) |
| 967 | { |
| 968 | pJsonStruct = cJSON_GetObjectItem(m_pJsonData, strKey.c_str()); |
| 969 | } |
| 970 | } |
| 971 | else if (m_pExternJsonDataRef != NULL) |
| 972 | { |
| 973 | if(m_pExternJsonDataRef->type == cJSON_Object) |
| 974 | { |
| 975 | pJsonStruct = cJSON_GetObjectItem(m_pExternJsonDataRef, strKey.c_str()); |
| 976 | } |
| 977 | } |
| 978 | if (pJsonStruct == NULL) |
| 979 | { |
| 980 | return(false); |
| 981 | } |
| 982 | return(pJsonStruct->type); |
| 983 | } |
| 984 | |
| 985 | bool CJsonObject::IsNull(const std::string& strKey) const |
| 986 | { |
nothing calls this directly
no test coverage detected