EncodingStrategy
public struct EncodingStrategy
This struct houses both the date and data encoding strategies for a request.
-
The encoding strategy for dates.
Declaration
Swift
public let dates: JSONEncoder.DateEncodingStrategy
-
The encoding strategy for data.
Declaration
Swift
public let data: JSONEncoder.DataEncodingStrategy
-
Initializes the struct with a date and data strategy.
Declaration
Swift
public init(dates: JSONEncoder.DateEncodingStrategy = .secondsSince1970, data: JSONEncoder.DataEncodingStrategy = .base64)
Parameters
dates
The date encoding strategy.
data
The data encoding strategy.