mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-13 14:02:54 +00:00
16 lines
388 B
Swift
16 lines
388 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
public final class APIDecoder: JSONDecoder {
|
|
public override init() {
|
|
super.init()
|
|
|
|
let dateFormatter = DateFormatter()
|
|
|
|
dateFormatter.dateFormat = Constants.dateFormat
|
|
dateDecodingStrategy = .formatted(dateFormatter)
|
|
keyDecodingStrategy = .convertFromSnakeCase
|
|
}
|
|
}
|