Lines Matching refs:cJSON

2   Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
198 CJSON_PUBLIC(char *) cJSONUtils_FindPointerFromObjectTo(const cJSON * const object, const cJSON * const target)
201 cJSON *current_child = 0;
262 static cJSON *get_array_item(const cJSON *array, size_t item)
264 cJSON *child = array ? array->child : NULL;
301 static cJSON *get_item_from_pointer(cJSON * const object, const char * pointer, const cJSON_bool case_sensitive)
303 cJSON *current_element = object;
348 CJSON_PUBLIC(cJSON *) cJSONUtils_GetPointer(cJSON * const object, const char *pointer)
353 CJSON_PUBLIC(cJSON *) cJSONUtils_GetPointerCaseSensitive(cJSON * const object, const char *pointer)
393 static cJSON *detach_item_from_array(cJSON *array, size_t which)
395 cJSON *c = array->child;
430 static cJSON *detach_path(cJSON *object, const unsigned char *path, const cJSON_bool case_sensitive)
434 cJSON *parent = NULL;
435 cJSON *detached_item = NULL;
484 static cJSON *sort_list(cJSON *list, const cJSON_bool case_sensitive)
486 cJSON *first = list;
487 cJSON *second = list;
488 cJSON *current_item = list;
489 cJSON *result = list;
490 cJSON *result_tail = NULL;
537 cJSON *smaller = NULL;
595 static void sort_object(cJSON * const object, const cJSON_bool case_sensitive)
604 static cJSON_bool compare_json(cJSON *a, cJSON *b, const cJSON_bool case_sensitive)
710 static cJSON_bool insert_item_in_array(cJSON *array, size_t which, cJSON *newitem)
712 cJSON *child = array->child;
747 static cJSON *get_object_item(const cJSON * const object, const char* name, const cJSON_bool case_sensitive)
759 static enum patch_operation decode_patch_operation(const cJSON * const patch, const cJSON_bool case_sensitive)
761 cJSON *operation = get_object_item(patch, "op", case_sensitive);
801 static void overwrite_item(cJSON * const root, const cJSON replacement)
821 memcpy(root, &replacement, sizeof(cJSON));
824 static int apply_patch(cJSON *object, const cJSON *patch, const cJSON_bool case_sensitive)
826 cJSON *path = NULL;
827 cJSON *value = NULL;
828 cJSON *parent = NULL;
860 static const cJSON invalid = { NULL, NULL, NULL, cJSON_Invalid, NULL, 0, 0, NULL};
907 cJSON *old_item = detach_path(object, (unsigned char*)path->valuestring, case_sensitive);
925 cJSON *from = get_object_item(patch, "from", case_sensitive);
1055 CJSON_PUBLIC(int) cJSONUtils_ApplyPatches(cJSON * const object, const cJSON * const patches)
1057 const cJSON *current_patch = NULL;
1084 CJSON_PUBLIC(int) cJSONUtils_ApplyPatchesCaseSensitive(cJSON * const object, const cJSON * const patches)
1086 const cJSON *current_patch = NULL;
1113 static void compose_patch(cJSON * const patches, const unsigned char * const operation, const unsigned char * const path, const unsigned char *suffix, const cJSON * const value)
1115 cJSON *patch = NULL;
1153 CJSON_PUBLIC(void) cJSONUtils_AddPatchToArray(cJSON * const array, const char * const operation, const char * const path, const cJSON * const value)
1158 static void create_patches(cJSON * const patches, const unsigned char * const path, cJSON * const from, cJSON * const to, const cJSON_bool case_sensitive)
1190 cJSON *from_child = from->child;
1191 cJSON *to_child = to->child;
1234 cJSON *from_child = NULL;
1235 cJSON *to_child = NULL;
1298 CJSON_PUBLIC(cJSON *) cJSONUtils_GeneratePatches(cJSON * const from, cJSON * const to)
1300 cJSON *patches = NULL;
1313 CJSON_PUBLIC(cJSON *) cJSONUtils_GeneratePatchesCaseSensitive(cJSON * const from, cJSON * const to)
1315 cJSON *patches = NULL;
1328 CJSON_PUBLIC(void) cJSONUtils_SortObject(cJSON * const object)
1333 CJSON_PUBLIC(void) cJSONUtils_SortObjectCaseSensitive(cJSON * const object)
1338 static cJSON *merge_patch(cJSON *target, const cJSON * const patch, const cJSON_bool case_sensitive)
1340 cJSON *patch_child = NULL;
1372 cJSON *replace_me = NULL;
1373 cJSON *replacement = NULL;
1398 CJSON_PUBLIC(cJSON *) cJSONUtils_MergePatch(cJSON *target, const cJSON * const patch)
1403 CJSON_PUBLIC(cJSON *) cJSONUtils_MergePatchCaseSensitive(cJSON *target, const cJSON * const patch)
1408 static cJSON *generate_merge_patch(cJSON * const from, cJSON * const to, const cJSON_bool case_sensitive)
1410 cJSON *from_child = NULL;
1411 cJSON *to_child = NULL;
1412 cJSON *patch = NULL;
1490 CJSON_PUBLIC(cJSON *) cJSONUtils_GenerateMergePatch(cJSON * const from, cJSON * const to)
1495 CJSON_PUBLIC(cJSON *) cJSONUtils_GenerateMergePatchCaseSensitive(cJSON * const from, cJSON * const to)