18 lines
411 B
Swift
18 lines
411 B
Swift
|
import Foundation
|
||
|
|
||
|
extension JSONEncoder {
|
||
|
static let devRant: JSONEncoder = {
|
||
|
let encoder = JSONEncoder()
|
||
|
encoder.dateEncodingStrategy = .iso8601
|
||
|
return encoder
|
||
|
}()
|
||
|
}
|
||
|
|
||
|
extension JSONDecoder {
|
||
|
static let devRant: JSONDecoder = {
|
||
|
let decoder = JSONDecoder()
|
||
|
decoder.dateDecodingStrategy = .iso8601WithOptionalFractionalSeconds
|
||
|
return decoder
|
||
|
}()
|
||
|
}
|