MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / getItem

Method getItem

framework/utils/CicadaJSON.cpp:156–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156CicadaJSONItem CicadaJSONItem::getItem(const std::string &name) const
157{
158 if (nullptr == mJSON) {
159 return CicadaJSONItem();
160 }
161
162 if (cJSON_HasObjectItem(mJSON, name.c_str())) {
163 cJSON *json = cJSON_GetObjectItem(mJSON, name.c_str());
164
165 if (json != nullptr) {
166 return CicadaJSONItem(json);
167 }
168 }
169
170 return CicadaJSONItem();
171}
172
173CicadaJSONArray CicadaJSONItem::getArray(const std::string& name) const
174{

Callers 3

setupFilterChainsMethod · 0.45
filterNetworkInfoMethod · 0.45
getPropertyJSONStrMethod · 0.45

Calls 3

CicadaJSONItemClass · 0.85
cJSON_HasObjectItemFunction · 0.85
cJSON_GetObjectItemFunction · 0.85

Tested by

no test coverage detected