metatext/Shared/Networking/Mastodon API/MastodonDecoder.swift
Justin Mazzocchi 25ed9d08fd
Reorganization
2020-08-08 16:57:59 -07:00

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
}
}