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 NSJSONReadingOptions parameter includes NSJSONReadingMutableContainers. Indeed, when I call with options of 0, I get a standard NSDictionary, but if I use NSJSONReadingMutableContainers, I get a NSMutableDictionary. What are you using for your options value?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With