How to parse JSON String?

你说的曾经没有我的故事 提交于 2019-12-23 12:15:42

问题


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.com",
        "link": "www.getfitslowly.com"
    }
]

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


回答1:


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..;)



来源:https://stackoverflow.com/questions/6277509/how-to-parse-json-string

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!