mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Add cJSONUtils_GenerateMergePatchCaseSensitive
This commit is contained in:
@@ -1247,9 +1247,8 @@ CJSON_PUBLIC(cJSON *) cJSONUtils_MergePatch(cJSON *target, const cJSON * const p
|
||||
return target;
|
||||
}
|
||||
|
||||
CJSON_PUBLIC(cJSON *) cJSONUtils_GenerateMergePatch(cJSON * const from, cJSON * const to)
|
||||
static cJSON *generate_merge_patch(cJSON * const from, cJSON * const to, const cJSON_bool case_sensitive)
|
||||
{
|
||||
cJSON_bool case_sensitive = false;
|
||||
cJSON *from_child = NULL;
|
||||
cJSON *to_child = NULL;
|
||||
cJSON *patch = NULL;
|
||||
@@ -1325,3 +1324,13 @@ CJSON_PUBLIC(cJSON *) cJSONUtils_GenerateMergePatch(cJSON * const from, cJSON *
|
||||
|
||||
return patch;
|
||||
}
|
||||
|
||||
CJSON_PUBLIC(cJSON *) cJSONUtils_GenerateMergePatch(cJSON * const from, cJSON * const to)
|
||||
{
|
||||
return generate_merge_patch(from, to, false);
|
||||
}
|
||||
|
||||
CJSON_PUBLIC(cJSON *) cJSONUtils_GenerateMergePatchCaseSensitive(cJSON * const from, cJSON * const to)
|
||||
{
|
||||
return generate_merge_patch(from, to, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user