MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / cJSON_Parse

Function cJSON_Parse

common/map_sdk/transmission/src/cJSON.cpp:350–360  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

348
349/* Parse an object - create a new root, and populate. */
350cJSON *cJSON_Parse(const char *value) {
351 cJSON *c = cJSON_New_Item();
352 ep = 0;
353 if (!c) return 0; /* memory fail */
354
355 if (!parse_value(c, skip(value))) {
356 cJSON_Delete(c);
357 return 0;
358 }
359 return c;
360}
361
362/* Render a cJSON item/entity/structure to text. */
363char *cJSON_Print(cJSON *item) { return print_value(item, 0, 1); }

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