Part Number: MSP-EXP432E401Y
Hello TI-Community,
I am trying to write an integer array into a JSON object (see Code: Data->U and Data->Y).
I am using the TI Utilities JSON API. (https://software-dl.ti.com/simplelink/esd/simplelink_msp432e4_sdk/3.10.00.11/docs/tiutils/html/group__ti__utils__json__JSON.html#ga455cfaada898bfb72f7ab01f4dbfc3be)
It works for small arrays:
#define SYS_IDENT_TEMPLATE \
"{" \
"\"Device\": string," \
"\"Data\": {" \
"\"U\": [int32]," \
"\"Y\": [int32]," \
"}" \
"}"
#define DEFAULT_JSONBUF \
"{" \
"\"Device\": \"IoTDeviceID\"," \
"\"Data\": {" \
"\"U\": []," \
"\"Y\": []," \
"}" \
"}"
When I add elements to the JSON-Array like this:
int j;
for (j = 0; j < (&my_array)->used; j= j+1 ) {
int temp = (&my_array)->value[j];
sprintf(keyBuf, "\"Data\".\"U\".[%d]", j);
retVal = Json_setValue(hObject, keyBuf, &temp, sizeof(temp));
if (retVal != 0) {
Display_printf(display, 0, 0, "Error setting the Data vector U value");
while (1);
}
}
it works unitl array element 255.
Is it possible to add more array elements (I need 1000)?
If it`s possible could you show me the problem?
(Note: In Json_createObject is the maxObjectSize set to 8196 => thats more than enough, thats not the problem)
With best regards
Patrick