把json字符串转成对象再获取
if let jsonData = c.data(using: String.Encoding.utf8, allowLossyConversion: false) {
//.........
print(JSON(jsonData)["base_info"]["introduce"])
}
把json字符串转成对象再获取
if let jsonData = c.data(using: String.Encoding.utf8, allowLossyConversion: false) {
//.........
print(JSON(jsonData)["base_info"]["introduce"])
}
本文标题:解析json数据获取某元素的值取出来的数据为NULL
本文链接:https://www.haomeiwen.com/subject/svpbhctx.html
网友评论