| 811 | return item; |
| 812 | } |
| 813 | cJSON *cJSON_CreateString(const char *string) { |
| 814 | cJSON *item = cJSON_New_Item(); |
| 815 | if (item) { |
| 816 | item->type = cJSON_String; |
| 817 | item->valuestring = cJSON_strdup(string); |
| 818 | } |
| 819 | return item; |
| 820 | } |
| 821 | cJSON *cJSON_CreateArray() { |
| 822 | cJSON *item = cJSON_New_Item(); |
| 823 | if (item) item->type = cJSON_Array; |
no test coverage detected