我想一个解决问题的办法 errror:不能援引“pathForResource”类型的参数列表“(字符串,ofType:JSON.Type)”
不能援引“pathForResource”与参数列表 型 '(字符串,ofType:JSON.Type)'
我的代码如下所示:
func parsejson() {
let path : String? = NSBundle.mainBundle().pathForResource("ooo", ofType: JSON) as String!
// let jsonData = NSData(contentsOfFile: path) as JSON!
// let readableJson = JSON(data: jsonData, options: NSJSONReadingOptions.MutableContainers, error: nil)
}
什么是'JSON'?它存储的值是多少? –
https://www.youtube.com/watch?v=_NfijT6mt6A –