Parse an object - create a new root, and populate. */
| 427 | |
| 428 | /* Parse an object - create a new root, and populate. */ |
| 429 | cJSON *cJSON_Parse(const char *value, const char **ep) |
| 430 | { |
| 431 | cJSON *c = cJSON_New_Item(); |
| 432 | *ep = 0; |
| 433 | if (!c) |
| 434 | return 0; /* memory fail */ |
| 435 | |
| 436 | if (!parse_value(c, skip(value), ep)) |
| 437 | { |
| 438 | cJSON_Delete(c); |
| 439 | return 0; |
| 440 | } |
| 441 | return c; |
| 442 | } |
| 443 | |
| 444 | /* Render a cJSON item/entity/structure to text. */ |
| 445 | char *cJSON_Print(cJSON *item) |
no test coverage detected