How to parse a JSON string?

In my application, I sent a request to the server using the POST method and in response to a JSON string printed on the console:

[ { "title": "American Heart Association", "link": "www.americanheart.org/" }, { "title": "EverydayHealth.com", "link": "www.everydayhealth.com" }, { "title": "GetFitSlowly.com", "link": "www.getfitslowly.com" } ] 

therefore, how to parse it, and take the title and link from this line

+4
source share
1 answer

Yes, like Jhaliya coming out higher ...

Tutorial: JSON Over HTTP On iPhone download from code here copy the JSON library to your code and just

object = [yourResponseInString JSONValue];

in the object you get an Array or a dictionary ..;)

0
source

All Articles