Other Parts Discussed in Thread: CC3220S
Tool/software: Code Composer Studio
Hello,
We are using cc3220S_LAUNCHXL json app, we have created the json template with 3 members inside the array.
it is working fine , but in our application array element count is not fixed, sometimes number if members can be 4 and sometimes it can be 6.
so , in that case how we can handle it while parsing?? can we define max size of array members ?
another thing Json_getArrayMembersCount returns, count of members defined in template. How to get actual populated member count ?
example the function "Json_getArrayMembersCount" returns incorrect count in case there is a mismatch is number of elements.
example
{
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 25,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
},
"phoneNumbers": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "office",
"number": "646 555-4567"
},
{
"type": "mobile",
"number": "123 456-7890"
}
],
"children": [],
"spouse": null
}