Implemented the "default" static constant for the JSONEncoder+Constants extension in the Foundation library.
This commit is contained in:
parent
db6500589a
commit
00b092f2b1
@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// JSONEncoder+Constants.swift
|
||||||
|
// ReviewsiTunesKit
|
||||||
|
//
|
||||||
|
// Created by Javier Cicchelli on 17/03/2024.
|
||||||
|
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension JSONEncoder {
|
||||||
|
|
||||||
|
// MARK: Constants
|
||||||
|
public static let `default` = {
|
||||||
|
let encoder = JSONEncoder()
|
||||||
|
|
||||||
|
encoder.dateEncodingStrategy = .iso8601
|
||||||
|
|
||||||
|
return encoder
|
||||||
|
}()
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user