| 2045 | } |
| 2046 | |
| 2047 | CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name) |
| 2048 | { |
| 2049 | cJSON *object_item = cJSON_CreateObject(); |
| 2050 | if (add_item_to_object(object, name, object_item, &global_hooks, false)) |
| 2051 | { |
| 2052 | return object_item; |
| 2053 | } |
| 2054 | |
| 2055 | cJSON_Delete(object_item); |
| 2056 | return NULL; |
| 2057 | } |
| 2058 | |
| 2059 | CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name) |
| 2060 | { |
nothing calls this directly
no test coverage detected