如何快速地解碼HTML實體?我正在從站點中提取一個JSON文件,收到的字符串之一是:The Weeknd ‘King Of The Fall’ [Video Premiere] | @TheWeeknd | #SoPhi我怎樣才能轉換成這樣的東西呢?‘變成正確的角色?我制作了一個Xcode游樂場來演示它:import UIKitvar error: NSError?let blogUrl: NSURL = NSURL.URLWithString("
let jsonData = NSData(contentsOfURL: blogUrl)let dataDictionary = NSJSONSerialization.JSONObjectWithData(jsonData, options: nil, error:
&error) as NSDictionaryvar a = dataDictionary["posts"] as NSArrayprintln(a[0]["title"])
- 3 回答
- 0 關注
- 770 瀏覽
添加回答
舉報
0/150
提交
取消