mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-27 02:21:07 +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
|
|
}
|
|
}
|