If you are an iOS developer you will need to use data type called NSDictionary.
When I m implementing REST web service consuming, I needed to populate data using using a NSDictionary. It worked fine but there was an issue coming when web service data is empty. So this case I had to find a way to check dictionary is empty or not either null or not.

I have tried below way but exception thrown.
[responseObject count];
Then I have tried and no errors was fired for empty list.
if([NSNull null] != [responseObject objectForKey:@”YOUR_JSON_OBJECT_NAME”]) {
//Wow this is worked.
}

Leave a Reply

Your email address will not be published. Required fields are marked *

WP Facebook Auto Publish Powered By : XYZScripts.com