如果您的JSON格式像{“ mainKey”:[{},{},…]}
NSError* error; NSDictionary* json = [NSJSonSerialization JSONObjectWithdata:responseData //1 options:kNilOptions error:&error]; NSArray* dataArray = [json objectForKey:@"mainKey"]; //2
否则您的JSON格式,例如[{},{},…]
NSError* error; NSArray* dataArray = [NSJSonSerialization JSONObjectWithdata:responseData //1 options:kNilOptions error:&error];
我认为您的格式是案例2:[]对象数组{}
教程:http://www.raywenderlich.com/5492/working-with-json-in-
ios-5
JSON:http://www.json.org



