Lines Matching defs:root
177 cJSON *root = cJSON_Parse(jsonStr);
178 if (root == NULL) {
181 cJSON *array = cJSON_GetObjectItem(root, FIELD_PERMISSION);
185 cJSON_Delete(root);
190 cJSON_Delete(root);
197 cJSON_Delete(root);
204 cJSON_Delete(root);
211 cJSON_Delete(root);
215 static int WritePermissions(const char *identifier, const cJSON *root)
221 const char *jsonStr = cJSON_PrintUnformatted(root);
239 cJSON *root = cJSON_CreateObject();
240 if (root == NULL) {
245 cJSON_Delete(root);
252 cJSON_Delete(root);
261 cJSON_Delete(root);
267 cJSON_Delete(root);
274 cJSON_AddItemToObject(root, FIELD_PERMISSION, array);
275 int ret = WritePermissions(identifier, root);
276 cJSON_Delete(root);