| 2364 | } |
| 2365 | |
| 2366 | CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw) |
| 2367 | { |
| 2368 | cJSON *item = cJSON_New_Item(&global_hooks); |
| 2369 | if(item) |
| 2370 | { |
| 2371 | item->type = cJSON_Raw; |
| 2372 | item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); |
| 2373 | if(!item->valuestring) |
| 2374 | { |
| 2375 | cJSON_Delete(item); |
| 2376 | return NULL; |
| 2377 | } |
| 2378 | } |
| 2379 | |
| 2380 | return item; |
| 2381 | } |
| 2382 | |
| 2383 | CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) |
| 2384 | { |
no test coverage detected