MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / cJSON_CreateRaw

Function cJSON_CreateRaw

lib/cJSON.c:2216–2231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2214}
2215
2216extern cJSON *cJSON_CreateRaw(const char *raw)
2217{
2218 cJSON *item = cJSON_New_Item();
2219 if(item)
2220 {
2221 item->type = cJSON_Raw;
2222 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw);
2223 if(!item->valuestring)
2224 {
2225 cJSON_Delete(item);
2226 return NULL;
2227 }
2228 }
2229
2230 return item;
2231}
2232
2233cJSON *cJSON_CreateArray(void)
2234{

Callers

nothing calls this directly

Calls 3

cJSON_New_ItemFunction · 0.70
cJSON_strdupFunction · 0.70
cJSON_DeleteFunction · 0.70

Tested by

no test coverage detected