---
title: "decodeIfPresent(_:forKey:configuration:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/keyeddecodingcontainer/decodeifpresent(_:forkey:configuration:)-469qf"
---

# decodeIfPresent(_:forKey:configuration:)

## Declaration

```swift
func decodeIfPresent<T>(_: T.Type, forKey key: KeyedDecodingContainer<K>.Key, configuration: T.DecodingConfiguration) throws -> T? where T : DecodableWithConfiguration
```
