| 171 | } |
| 172 | |
| 173 | CicadaJSONArray CicadaJSONItem::getArray(const std::string& name) const |
| 174 | { |
| 175 | if (nullptr == mJSON) { |
| 176 | return CicadaJSONArray(); |
| 177 | } |
| 178 | |
| 179 | if (cJSON_HasObjectItem(mJSON, name.c_str())) { |
| 180 | cJSON *json = cJSON_GetObjectItem(mJSON, name.c_str()); |
| 181 | |
| 182 | if (json != nullptr) { |
| 183 | return CicadaJSONArray(json); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | return CicadaJSONArray(); |
| 188 | } |
| 189 | |
| 190 | bool CicadaJSONItem::hasItem(const std::string &name) const |
| 191 | { |
no test coverage detected