mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-29 16:50:28 +00:00
15 lines
375 B
Swift
15 lines
375 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
class MastodonDecoder: JSONDecoder {
|
|
override init() {
|
|
super.init()
|
|
|
|
let dateFormatter = DateFormatter()
|
|
|
|
dateFormatter.dateFormat = MastodonAPI.dateFormat
|
|
dateDecodingStrategy = .formatted(dateFormatter)
|
|
keyDecodingStrategy = .convertFromSnakeCase
|
|
}
|
|
}
|