2020-07-30 01:50:30 +02:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
2020-08-31 02:18:19 +02:00
|
|
|
public final class APIDecoder: JSONDecoder {
|
2020-08-31 01:33:11 +02:00
|
|
|
public override init() {
|
2020-07-30 01:50:30 +02:00
|
|
|
super.init()
|
|
|
|
|
|
|
|
let dateFormatter = DateFormatter()
|
|
|
|
|
2020-08-31 01:33:11 +02:00
|
|
|
dateFormatter.dateFormat = Constants.dateFormat
|
2020-07-30 01:50:30 +02:00
|
|
|
dateDecodingStrategy = .formatted(dateFormatter)
|
|
|
|
keyDecodingStrategy = .convertFromSnakeCase
|
|
|
|
}
|
|
|
|
}
|