| 952 | cJSON_Delete(c); |
| 953 | } |
| 954 | void cJSON_ReplaceItemInObject(cJSON *object, const char *string, |
| 955 | cJSON *newitem) |
| 956 | { |
| 957 | int i = 0; |
| 958 | cJSON *c = object->child; |
| 959 | while (c && cJSON_strcasecmp(c->string, string)) |
| 960 | i++, c = c->next; |
| 961 | if (c) |
| 962 | { |
| 963 | newitem->string = cJSON_strdup(string); |
| 964 | cJSON_ReplaceItemInArray(object, i, newitem); |
| 965 | } |
| 966 | } |
| 967 | |
| 968 | /* Create basic types: */ |
| 969 | cJSON *cJSON_CreateNull() |
no test coverage detected