MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / cJSON_AddObjectToObject

Function cJSON_AddObjectToObject

libapp2sys/src/main/cpp/cjson/cJSON.c:2055–2065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2053}
2054
2055CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name)
2056{
2057 cJSON *object_item = cJSON_CreateObject();
2058 if (add_item_to_object(object, name, object_item, &global_hooks, false))
2059 {
2060 return object_item;
2061 }
2062
2063 cJSON_Delete(object_item);
2064 return NULL;
2065}
2066
2067CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2068{

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