swift-类型转换
2018-05-24 本文已影响11人
Alan龙马
![](https://img.haomeiwen.com/i1851858/f9172fe3d2edd0ad.png)
data 转 jSon
do {
let stringDic = try JSONSerialization.jsonObject(with: jsonData, options: .allowFragments) as? [String : Any]
print(stringDic)
} catch let error {
print(error)
}
data 转 jSon
do {
let stringDic = try JSONSerialization.jsonObject(with: jsonData, options: .allowFragments) as? [String : Any]
print(stringDic)
} catch let error {
print(error)
}