| 2025 | } |
| 2026 | |
| 2027 | CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number) |
| 2028 | { |
| 2029 | cJSON *number_item = cJSON_CreateNumber(number); |
| 2030 | if (add_item_to_object(object, name, number_item, &global_hooks, false)) |
| 2031 | { |
| 2032 | return number_item; |
| 2033 | } |
| 2034 | |
| 2035 | cJSON_Delete(number_item); |
| 2036 | return NULL; |
| 2037 | } |
| 2038 | |
| 2039 | CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) |
| 2040 | { |
nothing calls this directly
no test coverage detected