NSJSONReadingOptions constant instead of NSJSONWritingOptions constant was being passed to methods. NSJSONWritingOptions only include NSJSONWritingPrettyPrinted or Zero.