/// 路径
guard let path = Bundle.main.path(forResource: "main.json", ofType: nil),
let data = NSData(contentsOfFile: path),
let array = try? JSONSerialization.jsonObject(with: data as Data, options: []) as? [[String: Any]]
else {
return
}
网友评论