Lines Matching defs:node
333 bool ConfigParser::ParseRefImpl(cJSON *parent, const string &key, cJSON *node)
335 if (cJSON_IsArray(node)) {
338 return ParseJsonArrayRef(parent, key, node);
340 cJSON *arrayItem = node->child;
342 if (!ParseRefImpl(node, "", arrayItem)) {
347 } else if (cJSON_IsObject(node)) {
348 cJSON *child = node->child;
350 if (!ParseRefImpl(node, child->string, child)) {
355 } else if (!key.empty() && cJSON_IsString(node)) {
356 return ParseJsonStringRef(parent, key, node);
361 bool ConfigParser::ParseJsonArrayRef(cJSON *parent, const string &key, cJSON *node)
363 if (!node || !cJSON_IsArray(node)) {
364 cerr << "Error: '"<< key << "'node not array." << NEW_LINE_PATH << filePath_ << endl;
368 for (cJSON *item = node->child; item; item = item->next) {
390 bool ConfigParser::ParseJsonStringRef(cJSON *parent, const string &key, cJSON *node)
396 if (!node || !cJSON_IsString(node)) {
400 string value = node->valuestring;