| 2415 | } |
| 2416 | |
| 2417 | CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw) |
| 2418 | { |
| 2419 | cJSON *item = cJSON_New_Item(&global_hooks); |
| 2420 | if(item) |
| 2421 | { |
| 2422 | item->type = cJSON_Raw; |
| 2423 | item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); |
| 2424 | if(!item->valuestring) |
| 2425 | { |
| 2426 | cJSON_Delete(item); |
| 2427 | return NULL; |
| 2428 | } |
| 2429 | } |
| 2430 | |
| 2431 | return item; |
| 2432 | } |
| 2433 | |
| 2434 | CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) |
| 2435 | { |
no test coverage detected