| 2125 | } |
| 2126 | |
| 2127 | CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number) |
| 2128 | { |
| 2129 | cJSON *number_item = cJSON_CreateNumber(number); |
| 2130 | if (add_item_to_object(object, name, number_item, &global_hooks, false)) |
| 2131 | { |
| 2132 | return number_item; |
| 2133 | } |
| 2134 | |
| 2135 | cJSON_Delete(number_item); |
| 2136 | return NULL; |
| 2137 | } |
| 2138 | |
| 2139 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2140 | { |
nothing calls this directly
no test coverage detected