Tuesday 15 March 2011

parse json android and show it in textview -


I am new to Android development, in my website, the post returns with the following format in JSN:

  post = {'artist': 'xxxx', 'title': 'xxxx', 'text': 'xxxx', 'url': 'http: // xxxx'}   

I know something about getting a file from the net and saving it in the SD card, but I want to show it on the fly, purse and some text view, can you give me some simple code for this Are you

I tried to search but I have not found a good tutorial for this, so this is my last place which I am coming to solve my problem.

Actually you can do your XML as follows ( import statements left) out):

  public class post {private string artist , Title, text, url; Public Post () {} // No Argues Constructor} Public Sector Main {Public Fixed Zero Main (String [] Args) {GSON GSN = New GS (;); String jsonString = readFromNetwork (); // Read JSON from network ... Posted Post = GSN From Jason (Jasonstring, Post.); // Use populated post frequency with your JSON data. }}   

Read more.

No comments:

Post a Comment