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

Function cJSON_AddObjectToObject

contrib/cJSON/cJSON.cpp:2063–2073  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2061}
2062
2063CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name)
2064{
2065 cJSON *object_item = cJSON_CreateObject();
2066 if (add_item_to_object(object, name, object_item, &global_hooks, false))
2067 {
2068 return object_item;
2069 }
2070
2071 cJSON_Delete(object_item);
2072 return NULL;
2073}
2074
2075CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name)
2076{

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