DecodingStrategy

public struct DecodingStrategy

This struct houses both the date and data decoding strategies for a response.

  • The encoding strategy for dates.

    Declaration

    Swift

    public let dates: JSONDecoder.DateDecodingStrategy
  • The encoding strategy for data.

    Declaration

    Swift

    public let data: JSONDecoder.DataDecodingStrategy
  • Initializes the struct with a date and data strategy.

    Declaration

    Swift

    public init(dates: JSONDecoder.DateDecodingStrategy = .secondsSince1970, data: JSONDecoder.DataDecodingStrategy = .base64)

    Parameters

    dates

    The date encoding strategy.

    data

    The data encoding strategy.