0

Possible Duplicate:
How do I parse JSON with Objective-C?

I am downloading this Json data from server. Please help me to parsr this data properly.

{
    "query": {
        "id": 57,
        "uuid": "F247AE9F35014F7D82354FDC17C3F54C",
        "owner": "27",
        "url": "http://www.google.com",
        "urldata": {
            "name1": "http://www.orkut.com",
            "name2": "http://www.friendster.com",
            "name3": "http://www.facebook.com",
        }
    }
}

Thanks in advance

Community
  • 1
  • 1
Jayant Dash
  • 91
  • 1
  • 6

2 Answers2

2

If you are using iOS 5 or greater you can use NSJSONSerialization class for doing this:

NSError* error;
NSDictionary *jsonData = [NSJSONSerialization JSONObjectWithData:yourData options:kNilOptions error:&error];

If you are using less than iOS 5 check SBJSON

Midhun MP
  • 103,496
  • 31
  • 153
  • 200
0

What have you tried?

But read this - gives you an better understanding than just getting the answer directly :)

http://www.raywenderlich.com/5492/working-with-json-in-ios-5

Lasse
  • 362
  • 1
  • 10