MCPcopy Create free account
hub / github.com/OpenIPC/firmware / cJSON_CreateRaw

Function cJSON_CreateRaw

general/package/xmdp/src/cjson/cJSON.c:2503–2518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2501}
2502
2503CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
2504{
2505 cJSON *item = cJSON_New_Item(&global_hooks);
2506 if(item)
2507 {
2508 item->type = cJSON_Raw;
2509 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
2510 if(!item->valuestring)
2511 {
2512 cJSON_Delete(item);
2513 return NULL;
2514 }
2515 }
2516
2517 return item;
2518}
2519
2520CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void)
2521{

Callers 1

cJSON_AddRawToObjectFunction · 0.85

Calls 3

cJSON_New_ItemFunction · 0.85
cJSON_strdupFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected