MCPcopy Create free account
hub / github.com/binbyu/Reader / cJSON_AddArrayToObject

Function cJSON_AddArrayToObject

opensrc/cjson/cJSON.c:2061–2071  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2059}
2060
2061CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2062{
2063 cJSON *array = cJSON_CreateArray();
2064 if (add_item_to_object(object, name, array, &global_hooks, false))
2065 {
2066 return array;
2067 }
2068
2069 cJSON_Delete(array);
2070 return NULL;
2071}
2072
2073CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item)
2074{

Callers 4

json_header_tMethod · 0.85
json_item_tMethod · 0.85
create_jsonFunction · 0.85
export_book_sourceFunction · 0.85

Calls 3

cJSON_CreateArrayFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected