I'm trying to get server response NSData into NSDictionary but it returns following NSCFString.
NSError *error;
NSDictionary* jsonDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error];
And can't access data using objectForKey.
Give me a way to get this response as a NSDictionary or conversion mechanism. Cannot get anything NSJSONSerialization with kNilOptions returns nil.
According to this question can't serialize with
NSJSONSerializationwith optionkNilOptions.So first we need to get above serialized JSON as a
NSStringand then convert it into NSData again. Then you can convert it back toNSDictionarywithkNilOptions.