MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / cJSON_Parse

Function cJSON_Parse

modules/freeswitch/esl/src/esl_json.c:276–284  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

274
275/* Parse an object - create a new root, and populate. */
276ESL_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. */
287ESL_DECLARE(char *) cJSON_Print(cJSON *item) {return print_value(item,0,1);}

Callers 15

esl_event_create_jsonFunction · 0.70
mi_http_run_mi_cmdFunction · 0.50
handle_ioFunction · 0.50
process_extra_prometheusFunction · 0.50
dm_send_requestFunction · 0.50
dm_send_answerFunction · 0.50
dm_send_request_asyncFunction · 0.50
report_captureFunction · 0.50
store_deserializeFunction · 0.50
h2_send_responseFunction · 0.50
w_merge_jsonFunction · 0.50

Calls 4

cJSON_New_ItemFunction · 0.70
parse_valueFunction · 0.70
skipFunction · 0.70
cJSON_DeleteFunction · 0.70

Tested by

no test coverage detected