Parse an object - create a new root, and populate. */
| 251 | |
| 252 | /* Parse an object - create a new root, and populate. */ |
| 253 | cJSON *cJSON_Parse(const char *value) |
| 254 | { |
| 255 | cJSON *c=cJSON_New_Item(); |
| 256 | ep=nullptr; |
| 257 | if (!c) return nullptr; /* memory fail */ |
| 258 | |
| 259 | if (!parse_value(c,skip(value))) {cJSON_Delete(c);return nullptr;} |
| 260 | return c; |
| 261 | } |
| 262 | |
| 263 | /* Render a cJSON item/entity/structure to text. */ |
| 264 | char *cJSON_Print(cJSON *item) {return print_value(item,0,1);} |
no test coverage detected