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