From 2d07bbc9b2c50f895ce7191caba747916f7e805f Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Tue, 2 May 2017 00:36:10 +0200 Subject: [PATCH] Add cJSON_DeleteItemFromObjectCaseSensitive --- cJSON.c | 5 +++++ cJSON.h | 1 + 2 files changed, 6 insertions(+) diff --git a/cJSON.c b/cJSON.c index 74f17ba..5b32d01 100644 --- a/cJSON.c +++ b/cJSON.c @@ -1895,6 +1895,11 @@ CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string) cJSON_Delete(cJSON_DetachItemFromObject(object, string)); } +CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string) +{ + cJSON_Delete(cJSON_DetachItemFromObjectCaseSensitive(object, string)); +} + /* Replace array/object items with new ones. */ CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem) { diff --git a/cJSON.h b/cJSON.h index 0d69601..684efea 100644 --- a/cJSON.h +++ b/cJSON.h @@ -209,6 +209,7 @@ CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which); CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string); CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string); CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string); +CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string); /* Update array items. */ CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); /* Shifts pre-existing items to the right. */