I want to get data from JSON service. Only iOS 7 version crash when get data from JSON value. It returns from JSON service below that:
{
voteAverageRating =
Put a check before accessing the value from JSON like,
if([NSNull null] != [listDic objectForKey:@"voteCount"]) {
NSString *voteCount = [listDic objectForKey:@"voteCount"];
/// ....
}
Reason for checking is, collection objects like NSDictionary
do not allow values to be nil
, hence they are stored as null. Passing intValue
to a NSNull
will not work as it will not recognise this selector.
Hope that helps!