| 2372 | } |
| 2373 | |
| 2374 | CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw) |
| 2375 | { |
| 2376 | cJSON *item = cJSON_New_Item(&global_hooks); |
| 2377 | if(item) |
| 2378 | { |
| 2379 | item->type = cJSON_Raw; |
| 2380 | item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); |
| 2381 | if(!item->valuestring) |
| 2382 | { |
| 2383 | cJSON_Delete(item); |
| 2384 | return NULL; |
| 2385 | } |
| 2386 | } |
| 2387 | |
| 2388 | return item; |
| 2389 | } |
| 2390 | |
| 2391 | CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) |
| 2392 | { |
no test coverage detected