mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-13 22:12:54 +00:00
17 lines
425 B
Swift
17 lines
425 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
public final class APIEncoder: JSONEncoder {
|
|
public override init() {
|
|
super.init()
|
|
|
|
let dateFormatter = DateFormatter()
|
|
|
|
dateFormatter.dateFormat = Constants.dateFormat
|
|
dateEncodingStrategy = .formatted(dateFormatter)
|
|
keyEncodingStrategy = .convertToSnakeCase
|
|
outputFormatting = .sortedKeys
|
|
}
|
|
}
|