I am getting following the json response from a web-service api. I want to extract product data from the json. I also want to implement this using AFNetworking.
if you're using AFNetworking 3.0, AFJSONRequestOperation
doesn't exist anymore, you have to use AFHTTPSessionManager
:
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager GET:@"http://example.com/resources.json" parameters:nil progress:nil success:^(NSURLSessionTask *task, id responseObject) {
NSLog(@"JSON: %@", responseObject);
} failure:^(NSURLSessionTask *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];