I'm implementing an rest call to server and parsing the JSON:
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:
^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"error: %@",error.description);
}
else{
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data
options:kNilOptions
error:&error];
completionBlock(json,error);
}
}];
But the problem is when I try to access the contents the NSDictionary using objectForKey:
(lldb) po [json objectForKey:@"images"]
<extracting data from value failed>
If I po json:
{
images = (
{
.
.
}
);
}
My question to you guys is why I'm getting this error?, or there is a way around this?
I'll really appreciate your help