swift json字符串转数组
2018-06-19 本文已影响13人
有理想有暴富的小青年
let packarr : NSArray = try! JSONSerialization.jsonObject(with: tempstr.data(using: String.Encoding(rawValue: String.Encoding.utf8.rawValue))!, options: .allowFragments) as! NSArray
let packarr : NSArray = try! JSONSerialization.jsonObject(with: tempstr.data(using: String.Encoding(rawValue: String.Encoding.utf8.rawValue))!, options: .allowFragments) as! NSArray