cJSON

mirror of Dave's cJSON
git clone git://git.thc420.xyz/cJSON
Log | Files | Refs | README | LICENSE

commit b9cc911831b0b3e1bb72f142389428e59f882b38
parent 9abe75e072050f34732a7169740989a082b65134
Author: Max Bruckner <max@maxbruckner.de>
Date:   Wed, 14 Jun 2017 17:45:44 +0200

cJSON_Utils: Fix case sensitivity handling when adding to object

Diffstat:
McJSON_Utils.c | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cJSON_Utils.c b/cJSON_Utils.c @@ -943,7 +943,14 @@ static int apply_patch(cJSON *object, const cJSON *patch, const cJSON_bool case_ } else if (cJSON_IsObject(parent)) { - cJSON_DeleteItemFromObject(parent, (char*)child_pointer); + if (case_sensitive) + { + cJSON_DeleteItemFromObjectCaseSensitive(parent, (char*)child_pointer); + } + else + { + cJSON_DeleteItemFromObject(parent, (char*)child_pointer); + } cJSON_AddItemToObject(parent, (char*)child_pointer, value); value = NULL; }