<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/KeyedDecodingContainer/allKeys",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s22KeyedDecodingContainerV7allKeysSayxGvp"
  },
  "title" : "allKeys"
}
-->

# allKeys

All the keys the decoder has for this container.

```
var allKeys: [KeyedDecodingContainer<K>.Key] { get }
```

## Discussion

Different keyed containers from the same decoder may return different
keys here, because it is possible to encode with multiple key types
which are not convertible to one another. This should report all keys
present which are convertible to the requested type.

---

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)