NSCabezon
(Iván Cabezón)
1
Hi, I'm upgrading to Alamofire 5 and trying to convert all my requests, the thing is I previously used:
let decoder = JSONDecoder() decoder.dateDecodingStrategy = .iso8601
but now, I don't know where to put it. I've search in the documentation but al I see is encoding, not decoding...
thanks!
paiv
(🇺🇦 Pavel Ivashkov)
2
I assume one can do it through this interface:
So
let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .iso8601
AF.request(...)
.responseDecodable(of: SomeType.self, decoder: decoder) { response in
print("\(response)")
}