MCPcopy Create free account
hub / github.com/Netis/cloud-probe / cJSON_AddObjectToObject

Function cJSON_AddObjectToObject

cpworker/src/cJSON/cJSON.c:2181–2191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2179}
2180
2181CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name)
2182{
2183 cJSON *object_item = cJSON_CreateObject();
2184 if (add_item_to_object(object, name, object_item, &global_hooks, false))
2185 {
2186 return object_item;
2187 }
2188
2189 cJSON_Delete(object_item);
2190 return NULL;
2191}
2192
2193CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2194{

Callers

nothing calls this directly

Calls 3

cJSON_CreateObjectFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected