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

Method getStringOfObject

framework/utils/CicadaJSON.cpp:139–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139std::string CicadaJSONItem::getStringOfObject(const std::string &name) const
140{
141 if (nullptr == mJSON) {
142 return "";
143 }
144
145 if (cJSON_HasObjectItem(mJSON, name.c_str())) {
146 cJSON *json = cJSON_GetObjectItem(mJSON, name.c_str());
147
148 if (json != nullptr) {
149 return PrintJson(json);
150 }
151 }
152
153 return "";
154}
155
156CicadaJSONItem CicadaJSONItem::getItem(const std::string &name) const
157{

Callers

nothing calls this directly

Calls 3

cJSON_HasObjectItemFunction · 0.85
cJSON_GetObjectItemFunction · 0.85
PrintJsonFunction · 0.85

Tested by

no test coverage detected