开发者

iphone: parsing a string

Hey I have a response string in this format

ok my original resonse string is like this

{
  "data": [
    {
     "name": "Santa Fe Plaza",
     "category": "Landmark",
     "location": {
        "city": "Santa Fe",
        "state": "NM",
        "country": "United States",
        "latitude": 35.687071155202,
        "longitude": -105.93767717603
     },
     "id": "108196762542063"
  },
  {
     "name": "Museum of Contemporary Native Arts",
     "cat开发者_如何学JAVAegory": "Museum/art gallery",
     "location": {
        "street": "108 Cathedral Place",
        "city": "Santa Fe",
        "state": "NM",
        "country": "United States",
        "zip": "87501",
        "latitude": 35.686915835451,
        "longitude": -105.93725120129
     },
     "id": "106209180361"
  }

] }

I have to extract all the names from there Please enlighten me how to achieve this JSON parser is throwing error all the time

Thanx in advance


Start by downloading the JSON framework

And a Good Tutorial to Start learning: JSON Framework for iPhone

Also see: How to parse JSON files on iPhone in Objective-C into NSArray and NSDictionary

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜