DataDecodingStrategy

public enum DataDecodingStrategy

The strategy to use for decoding Data values.

  • Defer to Data for decoding.

    Declaration

    Swift

    case deferredToData
  • Decode the Data from a Base64-encoded string.

    Declaration

    Swift

    case base64
  • raw

    Don’t decode. This is the default strategy.

    Declaration

    Swift

    case raw
  • Decode the Data as a custom value decoded by the given closure.

    Declaration

    Swift

    case custom((_ decoder: Decoder) throws -> Data)