Getting JSON by using Alamofire and decode - Swift 4
问题 I have an API and I also want to get request. But I try to using JSONDecoder to convert data type and I failed. I don't know how to decode this Json like following data. I want to take json["response"] contents setting my User struct. Have any suggestion to me? Thanks. Error Domain=NSCocoaErrorDomain Code=4865 "No value associated with key id ("id")." UserInfo={NSCodingPath=( ), NSDebugDescription=No value associated with key id ("id").} This is JSON Data: { "status": "success", "response": {