【发布时间】:2018-05-12 20:05:41
【问题描述】:
我正在尝试如下解析 google Direction API。 https://developers.google.com/maps/documentation/directions/start
但无法从 JSONDecoder 得到任何结果,它总是返回错误块 我正在使用下面的 Alamofire 代码进行解析。
let decoder = JSONDecoder()
do {
let userDictionary = try decoder.decode(DirectionParser.self, from: response.data!)
print("The Parser \(userDictionary)")
} catch {
print("Error")
}
【问题讨论】: