MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / GetValueType

Method GetValueType

eval/LANE_evaluation/lane2d/src/CJsonObject.cpp:961–983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

959}
960
961int 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
985bool CJsonObject::IsNull(const std::string& strKey) const
986{

Callers

nothing calls this directly

Calls 2

cJSON_GetObjectItemFunction · 0.85
cJSON_GetArrayItemFunction · 0.85

Tested by

no test coverage detected