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

Function cJSON_AddItemToObject

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

Source from the content-addressed store, hash-verified

885}
886
887void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item)
888{
889 if (!item)
890 return;
891 if (item->string)
892 cJSON_free(item->string);
893 item->string = cJSON_strdup(string);
894 cJSON_AddItemToArray(object, item);
895}
896void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item)
897{
898 cJSON_AddItemToArray(array, create_reference(item));

Callers 6

AddEmptySubObjectMethod · 0.85
AddEmptySubArrayMethod · 0.85
AddMethod · 0.85
AddWithMoveMethod · 0.85
AddNullMethod · 0.85

Calls 2

cJSON_strdupFunction · 0.85
cJSON_AddItemToArrayFunction · 0.85

Tested by

no test coverage detected