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

Method IsNull

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

Source from the content-addressed store, hash-verified

983}
984
985bool 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
1013bool CJsonObject::Add(const std::string& strKey, const CJsonObject& oJsonObject)
1014{

Callers

nothing calls this directly

Calls 2

cJSON_GetObjectItemFunction · 0.85
cJSON_GetArrayItemFunction · 0.85

Tested by

no test coverage detected