我使用以下代码从JSON文件中检索数据。
我遇到了以下错误。
有没有人可以告诉我替代方案?
let jsonData = try NSData.dataWithContentsOfMappedFile("/Users/User/Desktop/Employee.json")
我遇到了以下错误。
dataWithContentsOfMappedFile was deprecated in iOS 8.0: Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead
有没有人可以告诉我替代方案?