MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / cJSON_AddObjectToObject

Function cJSON_AddObjectToObject

TheForceEngine/TFE_System/cJSON.c:2168–2178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2166}
2167
2168CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name)
2169{
2170 cJSON *object_item = cJSON_CreateObject();
2171 if (add_item_to_object(object, name, object_item, &global_hooks, false))
2172 {
2173 return object_item;
2174 }
2175
2176 cJSON_Delete(object_item);
2177 return NULL;
2178}
2179
2180CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2181{

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