전체 응답 개체를 신속하게 키에 매핑하는 방법은 무엇입니까?전체 json 개체를 신속하게 매핑하는 방법은 무엇입니까?
class Response: Mappable {
var id = String()
var fullResponse = NSDictionary()
required init?(map: Map){
}
func mapping(map: Map) {
id <- map["id"]
// don't know how to map the full json from the repose to the fullResponse key.
fullResponse <- map // map returns empty
}
}
전체 json 개체를 키로 매핑하는 방법을 모르겠습니다.
응답 해 주셔서 감사합니다. –
fullResponse <- map [ "yourfullResponseKey"] –
전체 응답 키가 없습니다. 그 응답에서. Reposonse JSON을 매핑하기 위해 필요한 키와 하나의 분리 된 키에 대한 응답을 매핑하고 있습니다. –