Home
last modified time | relevance | path

Searched refs:jsonArr (Results 1 – 4 of 4) sorted by relevance

/base/security/device_auth/common_lib/impl/src/
Djson_utils.c162 CJson *GetItemFromArray(const CJson *jsonArr, int index) in GetItemFromArray() argument
164 if (jsonArr == NULL) { in GetItemFromArray()
167 return cJSON_GetArrayItem(jsonArr, index); in GetItemFromArray()
351 int32_t AddObjToArray(CJson *jsonArr, CJson *item) in AddObjToArray() argument
353 if (jsonArr == NULL || item == NULL) { in AddObjToArray()
357 if (cJSON_IsArray(jsonArr) == false) { in AddObjToArray()
361 bool ret = cJSON_AddItemToArray(jsonArr, item); in AddObjToArray()
369 int32_t AddStringToArray(CJson *jsonArr, const char *string) in AddStringToArray() argument
371 if (jsonArr == NULL || string == NULL) { in AddStringToArray()
375 if (cJSON_IsArray(jsonArr) == false) { in AddStringToArray()
[all …]
/base/security/device_auth/test/unittest/deviceauth/source/
Djson_utils_mock.c220 CJson *GetItemFromArray(const CJson *jsonArr, int index) in GetItemFromArray() argument
222 if (jsonArr == NULL) { in GetItemFromArray()
225 return cJSON_GetArrayItem(jsonArr, index); in GetItemFromArray()
409 int32_t AddObjToArray(CJson *jsonArr, CJson *item) in AddObjToArray() argument
411 if (jsonArr == NULL || item == NULL) { in AddObjToArray()
415 if (cJSON_IsArray(jsonArr) == false) { in AddObjToArray()
419 bool ret = cJSON_AddItemToArray(jsonArr, item); in AddObjToArray()
427 int32_t AddStringToArray(CJson *jsonArr, const char *string) in AddStringToArray() argument
429 if (jsonArr == NULL || string == NULL) { in AddStringToArray()
433 if (cJSON_IsArray(jsonArr) == false) { in AddStringToArray()
[all …]
/base/security/device_auth/common_lib/interfaces/
Djson_utils.h70 CJson *GetItemFromArray(const CJson *jsonArr, int index);
91 int32_t AddObjToArray(CJson *jsonArr, CJson *item);
93 int32_t AddStringToArray(CJson *jsonArr, const char *string);
/base/security/device_auth/test/unittest/deviceauth/unit_test/source/
Dcommon_lib_test.cpp410 CJson *jsonArr = CreateJsonFromString(TEST_JSON_STR_ARR); variable
411 EXPECT_NE(jsonArr, nullptr);
416 ret = AddObjToJson(jsonArr, "gender", childObj);
418 ret = AddObjToJson(jsonArr, "name", childObj);
422 ret = AddObjToArray(childObj, jsonArr);
424 ret = AddObjToArray(jsonArr, childObj);
430 ret = AddStringToArray(jsonArr, TEST_STR);
438 FreeJson(jsonArr);