MCPcopy Index your code
hub / github.com/DaveGamble/cJSON / cJSON_AddObjectToObject

Function cJSON_AddObjectToObject

cJSON.c:2219–2229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2217}
2218
2219CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name)
2220{
2221 cJSON *object_item = cJSON_CreateObject();
2222 if (add_item_to_object(object, name, object_item, &global_hooks, false))
2223 {
2224 return object_item;
2225 }
2226
2227 cJSON_Delete(object_item);
2228 return NULL;
2229}
2230
2231CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2232{

Calls 3

cJSON_CreateObjectFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…