In my understanding, decoding array of string is like this, if we have this bytes [118,97,108,49,0,118,97,108,50,0], it can be translated to String[ "val1", "val2" ].
Determining Field's value as String or or String[] is easy since we can determine it based on Array column value specified in the Profile.xlsx to have [N] or [3] for example:
leader_activity_id_string | string | [N] | String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal |
However, I would like guidance on distinguishing between a String and String[] in the Developer Field.
This is the only example that I could find, it comes from Suunto's Developer Field (https://apizone.suunto.com/fit-description), but still even thought it explicitly says the value is a String[], it does not specify the Array field found in the field_description, is there any guidance or best practice regarding this?
Here is the example I mentioned earlier. I look forward to hearing from you.Your insights are appreciated. Thank you.
session.suuntoplus_plugin_owner_id - String[], 1 - 10 strings, 1 - 64 characters each.FieldDescription -messages:
developer_data_index: 0
field_definition_number: 2
field_name: "suuntoplus_plugin_owner_id"
units: null
fit_base_type_id: String
developer_data_index: 0
field_definition_number: 3
field_name: "suuntoplus_plugin_external_id"
units: null
fit_base_type_id: String
Profile.xlsx reference on field_description:
field_description | ||||
0 | developer_data_index | uint8 | ||
1 | field_definition_number | uint8 | ||
2 | fit_base_type_id | fit_base_type | ||
3 | field_name | string | [N] | |
4 | array | uint8 | ||
5 | components | string | ||
6 | scale | uint8 | ||
7 | offset | sint8 | ||
8 | units | string | [N] | |
9 | bits | string | ||
10 | accumulate | string | ||
13 | fit_base_unit_id | fit_base_unit | ||
14 | native_mesg_num | mesg_num | ||
15 | native_field_num | uint8 |