Android Question Bidimensional array to Json

Lello1964

Well-Known Member
Licensed User
Longtime User
Hi,

I have a bidimensional array :

B4X:
dim Lista(10,10) as double

how do i convert it to json?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
To a B4X app? Use B4XSerializator.

In both cases, serializator or json, you will need to convert the array to something else and then back to an array.
Might be better to switch to a different collection. Arrays are quite limited.

B4X:
Dim Rows As List
Rows.Initialize
For r = 0 to 9
 Dim cols As List
 cols.Initialize
 Rows.Add(cols)
 For c = 0 to 9
  cols.Add(Lista(r, c))
 Next
Next
Now you should serialize Rows.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…