<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/JSONDecoder/DataDecodingStrategy-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation11JSONDecoderC20DataDecodingStrategyO"
  },
  "title" : "JSONDecoder.DataDecodingStrategy"
}
-->

# JSONDecoder.DataDecodingStrategy

The strategies for decoding raw data.

```
enum DataDecodingStrategy
```

## Topics

### Base64 Decoding

[`JSONDecoder.DataDecodingStrategy.base64`](/documentation/Foundation/JSONDecoder/DataDecodingStrategy-swift.enum/base64)

The strategy that decodes data using Base 64 decoding.

### Custom Decoding

[`JSONDecoder.DataDecodingStrategy.custom(_:)`](/documentation/Foundation/JSONDecoder/DataDecodingStrategy-swift.enum/custom(_:))

The strategy that decodes data using a user-defined function.

### Data Decoding

[`JSONDecoder.DataDecodingStrategy.deferredToData`](/documentation/Foundation/JSONDecoder/DataDecodingStrategy-swift.enum/deferredToData)

The strategy that encodes data using the encoding specified by the data instance itself.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)