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
.