Lines Matching refs:node
54 bool Serializable::GetValue(cJSON *node, const std::string &name, std::string &value)
56 auto subNode = GetSubNode(node, name);
65 bool Serializable::GetValue(cJSON *node, const std::string &name, int32_t &value)
67 auto subNode = GetSubNode(node, name);
76 bool Serializable::GetValue(cJSON *node, const std::string &name, uint32_t &value)
78 auto subNode = GetSubNode(node, name);
92 bool Serializable::GetValue(cJSON *node, const std::string &name, bool &value)
94 auto subNode = GetSubNode(node, name);
103 bool Serializable::GetValue(cJSON *node, const std::string &name, Serializable &value)
105 auto object = GetSubNode(node, name);
113 bool Serializable::SetValue(cJSON *node, const std::string &name, const std::string &value)
115 auto item = cJSON_AddStringToObject(node, name.c_str(), value.c_str());
119 bool Serializable::SetValue(cJSON *node, const std::string &name, const int32_t &value)
121 auto item = cJSON_AddNumberToObject(node, name.c_str(), value);
125 cJSON *Serializable::GetSubNode(cJSON *node, const std::string &name)
128 IMSA_HILOGD("end node.");
129 return node;
131 if (!cJSON_IsObject(node)) {
135 if (!cJSON_HasObjectItem(node, name.c_str())) {
139 return cJSON_GetObjectItem(node, name.c_str());