JSON string parsed, received JSONArray.

From it I in a cycle select lines:

str=JSONArray.getString(i); 

I get strings like:

 i {"a":["Andrey",22,92,172],"t1":[5.15,1.38,142564],"t2":1398618093} i+1 {"a":["Slava",25,80,170],"t1":[6.15,1.98,142565],"t2":1398615095,"t3":1398615095} ... 

And I do not know why I thrust them ArrayList arListPipl.add(str); .

Next, I will build a beautiful listView consisting of Andrew, Glory, etc. with their names and parameters, ordered by the first element of the t1 array.

I do not have enough experience to throw the right plan of action:

  1. In what form do I submit my data so that they are stored in one place and I could quickly get the values ​​of the array "t1" or "a"?

  2. How and in what way to pack such different data in a clear for the adapter structure?

  3. Which adapter to choose so that I can sort the list by the first element of the t1 array?

  • 3
    bream should be given to the one who wrote the server. - Vladyslav Matviienko
  • In the sense that numbers should be represented by strings? - Gennady
  • 3
    In the sense that the data has no structure. Each array should contain data of the same type. Each object of a certain type must have the same set of fields ... I would refuse to work with such data. ["Andrey", 22,92,172] - how can you put a string and numbers in one array ??? - Vladyslav Matviienko
  • How to get out of this situation, if I cannot change the server part? - Gennady
  • create a data model. If it is possible here at all. And parse the data in this model. - Vladyslav Matviienko

0