Parse an object - create a new root, and populate. */
| 274 | |
| 275 | /* Parse an object - create a new root, and populate. */ |
| 276 | ESL_DECLARE(cJSON *)cJSON_Parse(const char *value) |
| 277 | { |
| 278 | cJSON *c=cJSON_New_Item(); |
| 279 | ep=0; |
| 280 | if (!c) return 0; /* memory fail */ |
| 281 | |
| 282 | if (!parse_value(c,skip(value))) {cJSON_Delete(c);return 0;} |
| 283 | return c; |
| 284 | } |
| 285 | |
| 286 | /* Render a cJSON item/entity/structure to text. */ |
| 287 | ESL_DECLARE(char *) cJSON_Print(cJSON *item) {return print_value(item,0,1);} |
no test coverage detected