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