mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-03 05:46:30 +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
|
|
}
|
|
}
|