Files

19 lines
555 B
Swift

import Foundation
/// Single decoder/encoder factory shared by every fixture load and both DS clients
/// (call-shape single source of truth). NO `.convertFromSnakeCase` (every model has explicit
/// CodingKeys) and NO global date strategy (dates are String-raw + DSDate accessors).
public enum DSDecoder {
public static func make() -> JSONDecoder {
JSONDecoder()
}
}
public enum DSEncoder {
public static func make() -> JSONEncoder {
let e = JSONEncoder()
e.outputFormatting = [.sortedKeys]
return e
}
}