1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-18 12:28:35 +01:00
metatext-app-ios-iphone-ipad/Shared/Networking/MastodonEncoder.swift
2020-07-31 00:13:54 -07:00

17 lines
412 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
class MastodonEncoder: JSONEncoder {
override init() {
super.init()
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = MastodonAPI.dateFormat
dateEncodingStrategy = .formatted(dateFormatter)
keyEncodingStrategy = .convertToSnakeCase
outputFormatting = .sortedKeys
}
}