Parse an object - create a new root, and populate. */
| 348 | |
| 349 | /* Parse an object - create a new root, and populate. */ |
| 350 | cJSON *cJSON_Parse(const char *value) { |
| 351 | cJSON *c = cJSON_New_Item(); |
| 352 | ep = 0; |
| 353 | if (!c) return 0; /* memory fail */ |
| 354 | |
| 355 | if (!parse_value(c, skip(value))) { |
| 356 | cJSON_Delete(c); |
| 357 | return 0; |
| 358 | } |
| 359 | return c; |
| 360 | } |
| 361 | |
| 362 | /* Render a cJSON item/entity/structure to text. */ |
| 363 | char *cJSON_Print(cJSON *item) { return print_value(item, 0, 1); } |
no test coverage detected