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