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

Function cJSON_AddRawToObject

contrib/cJSON/cJSON.cpp:2051–2061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2049}
2050
2051CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw)
2052{
2053 cJSON *raw_item = cJSON_CreateRaw(raw);
2054 if (add_item_to_object(object, name, raw_item, &global_hooks, false))
2055 {
2056 return raw_item;
2057 }
2058
2059 cJSON_Delete(raw_item);
2060 return NULL;
2061}
2062
2063CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name)
2064{

Callers

nothing calls this directly

Calls 3

cJSON_CreateRawFunction · 0.85
add_item_to_objectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected