| 2164 | } |
| 2165 | |
| 2166 | CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name) |
| 2167 | { |
| 2168 | cJSON *object_item = cJSON_CreateObject(); |
| 2169 | if (add_item_to_object(object, name, object_item, &global_hooks, false)) |
| 2170 | { |
| 2171 | return object_item; |
| 2172 | } |
| 2173 | |
| 2174 | cJSON_Delete(object_item); |
| 2175 | return NULL; |
| 2176 | } |
| 2177 | |
| 2178 | CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name) |
| 2179 | { |
nothing calls this directly
no test coverage detected