MCPcopy Create free account
hub / github.com/Bwar/CJsonObject / cJSON_Parse

Function cJSON_Parse

cJSON.c:429–442  ·  view source on GitHub ↗

Parse an object - create a new root, and populate. */

Source from the content-addressed store, hash-verified

427
428/* Parse an object - create a new root, and populate. */
429cJSON *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. */
445char *cJSON_Print(cJSON *item)

Callers 4

ParseMethod · 0.85
AddMethod · 0.85
ReplaceMethod · 0.85
AddAsFirstMethod · 0.85

Calls 4

cJSON_New_ItemFunction · 0.85
parse_valueFunction · 0.85
skipFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected