Before that, json did not work. It is necessary to display json elements in the ListView.

He took http://dajver.blogspot.com/2013/02/json.html as a basis.

What needs to be changed in this code if json has the format not

{ "data": [ { "firstName": "John", "lastName": "Doe" }, { "firstName": "Anna", "lastName": "Smith" }, { "firstName": "Peter", "lastName": "Jones" } ] } 

but just

 [ { "firstName": "John", "lastName": "Doe" }, { "firstName": "Anna", "lastName": "Smith" }, { "firstName": "Peter", "lastName": "Jones" } ] 

    2 answers 2

    Go to Google and enter "json and listview android" And that's what I gave out to Tyk Klats Boom

    • If you can find how to change how to change JSON (but you can't seem to be in javascript) - Perkovec

    Override the adapter for the ListView and read about the inflate. You will be able to display anything.