开发者

How to parse JSON String?

开发者 https://www.devze.com 2023-03-11 23:46 出处:网络
In my app, I have send some Request to server using POST Method and in response following JSON string printed on console :

In my app, I have send some Request to server using POST Method and in response following JSON string printed on console :

[
    {
         "title": "American Heart Association",
         "link": "www.americanheart.org/"
    },
    {
        "title": "EverydayHealth.com",
        "link": "www.everydayhealth.com"
    },
    {
        "title": "GetFitSlowly.co开发者_运维知识库m",
        "link": "www.getfitslowly.com"
    }
]

so, how to parse it, and take title and link from this string


Yes as Jhaliya posted above...

Tutorial: JSON Over HTTP On The iPhone download from code here copy JSON library in your code and simple

object = [yourResponseInString JSONValue];

in object you'll get Array or dictionary..;)

0

精彩评论

暂无评论...
验证码 换一张
取 消