MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / cJSON_AddObjectToObject

Function cJSON_AddObjectToObject

framework/utils/cJSON.c:2047–2057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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