To DeSerialize a JSON String I am using the following method:
+ (id)JSONObjectWithData:(NSData *)data options:(NSJSONReadingOptions)opt error:(NSError **)error
But, I found that reading option returns mutable Object. Is there a way using which I will be able receive object which is immutable?
You should only get mutable objects if your
NSJSONReadingOptionsparameter includesNSJSONReadingMutableContainers. Indeed, when I call withoptionsof0, I get a standardNSDictionary, but if I useNSJSONReadingMutableContainers, I get aNSMutableDictionary. What are you using for youroptionsvalue?