I am trying to parse a responseObject from AFNetworking. I was able to store the responseObject's results into a NSDictionary object called getData but I tested it out using a breakpoint, and getData just contains a bunch of strings. Does anybody know how I can extract the data?
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
NSSet *acceptableTypes = [NSSet setWithObjects:@"application/json", @"text/plain", nil];
manager.responseSerializer.acceptableContentTypes = acceptableTypes;
__block NSDictionary *getData;
__block NSMutableArray *filenames = [[NSMutableArray alloc] init];
[manager GET:URLString parameters:parameters
success:^(AFHTTPRequestOperation *operation, id responseObject)
{
NSLog(@"responseObject: %@", responseObject);
NSLog(@"operation.responseString: %@",operation.responseString);
NSLog(@"operation.response: %@",operation.response);
self.downloadSuccess = YES;
getData = [NSJSONSerialization JSONObjectWithData:responseObject options:0 error:nil];
NSLog(@"size: %lu", (unsigned long)getData.count);
}
failure:^(AFHTTPRequestOperation *operation, NSError *error)
{
NSLog(@"Error [getDataFromServer]: %@", error);
NSLog(@"Error Response --> %@",operation.responseString);
self.downloadSuccess = NO;
}];
Here is an image of what the strings in getData look like.