MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / cJSON_Parse

Function cJSON_Parse

eval/LANE_evaluation/lane2d/src/cJSON.c:435–448  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

433
434/* Parse an object - create a new root, and populate. */
435cJSON *cJSON_Parse(const char *value, const char **ep)
436{
437 cJSON *c = cJSON_New_Item();
438 *ep = 0;
439 if (!c)
440 return 0; /* memory fail */
441
442 if (!parse_value(c, skip(value), ep))
443 {
444 cJSON_Delete(c);
445 return 0;
446 }
447 return c;
448}
449
450/* Render a cJSON item/entity/structure to text. */
451char *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