mirror of https://github.com/DaveGamble/cJSON
Add cJSON_ReplaceItemInObjectCaseSensitive
This commit is contained in:
parent
8b953d1202
commit
dede4e3246
5
cJSON.c
5
cJSON.c
|
@ -1980,6 +1980,11 @@ CJSON_PUBLIC(void) cJSON_ReplaceItemInObject(cJSON *object, const char *string,
|
|||
cJSON_ReplaceItemViaPointer(object, cJSON_GetObjectItem(object, string), newitem);
|
||||
}
|
||||
|
||||
CJSON_PUBLIC(void) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object, const char *string, cJSON *newitem)
|
||||
{
|
||||
cJSON_ReplaceItemViaPointer(object, cJSON_GetObjectItemCaseSensitive(object, string), newitem);
|
||||
}
|
||||
|
||||
/* Create basic types: */
|
||||
CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void)
|
||||
{
|
||||
|
|
1
cJSON.h
1
cJSON.h
|
@ -216,6 +216,7 @@ CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newit
|
|||
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement);
|
||||
CJSON_PUBLIC(void) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem);
|
||||
CJSON_PUBLIC(void) cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem);
|
||||
CJSON_PUBLIC(void) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object,const char *string,cJSON *newitem);
|
||||
|
||||
/* Duplicate a cJSON item */
|
||||
CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse);
|
||||
|
|
Loading…
Reference in New Issue