f512d94c74
git-subtree-dir: clients/ds-app git-subtree-mainline:a24e3e6f22git-subtree-split:5206cf3b0c
19 lines
555 B
Swift
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
|
|
}
|
|
}
|