MCPcopy Create free account
hub / github.com/Wassimulator/CactusViewer / cJSON_AddObjectToObject

Function cJSON_AddObjectToObject

src/cJSON.c:2163–2173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2161}
2162
2163CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name)
2164{
2165 cJSON *object_item = cJSON_CreateObject();
2166 if (add_item_to_object(object, name, object_item, &global_hooks, false))
2167 {
2168 return object_item;
2169 }
2170
2171 cJSON_Delete(object_item);
2172 return NULL;
2173}
2174
2175CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2176{

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