MCPcopy Create free account
hub / github.com/ByConity/ByConity / cJSON_AddArrayToObject

Function cJSON_AddArrayToObject

contrib/cJSON/cJSON.cpp:2075–2085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2073}
2074
2075CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2076{
2077 cJSON *array = cJSON_CreateArray();
2078 if (add_item_to_object(object, name, array, &global_hooks, false))
2079 {
2080 return array;
2081 }
2082
2083 cJSON_Delete(array);
2084 return NULL;
2085}
2086
2087CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
2088{

Callers

nothing calls this directly

Calls 3

cJSON_CreateArrayFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected