| 2196 | } |
| 2197 | |
| 2198 | CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number) |
| 2199 | { |
| 2200 | cJSON *number_item = cJSON_CreateNumber(number); |
| 2201 | if (add_item_to_object(object, name, number_item, &global_hooks, false)) |
| 2202 | { |
| 2203 | return number_item; |
| 2204 | } |
| 2205 | |
| 2206 | cJSON_Delete(number_item); |
| 2207 | return NULL; |
| 2208 | } |
| 2209 | |
| 2210 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2211 | { |
nothing calls this directly
no test coverage detected