Implemented the "default" static constant for the JSONEncoder+Constants extension in the Foundation library.

This commit is contained in:
Javier Cicchelli 2024-03-17 22:24:32 +01:00
parent db6500589a
commit 00b092f2b1

View File

@ -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
}()
}