Structureswift 6.0.1Swift
KeyedDecodingContainer
A concrete container that provides a view into a decoder’s storage, making the encoded properties of a decodable type accessible by keys.
struct KeyedDecodingContainer<K> where K : CodingKey
Citizens in Swift
Conformances
protocol KeyedDecodingContainerProtocol
A type that provides a view into a decoder’s storage and is used to hold the encoded properties of a decodable type in a keyed manner.
Typealiases
Type members
init<Container>(Container
) Creates a new instance with the given container.
Instance members
var allKeys: [KeyedDecodingContainer<K>.Key]
All the keys the decoder has for this container.
var codingPath: [any CodingKey]
func contains(KeyedDecodingContainer<K>.Key
) -> Bool Returns a Boolean value indicating whether the decoder contains a value associated with the given key.
func decode(String.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> String func decode(Bool.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Bool func decode(Double.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Double func decode(Float.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Float func decode(Int.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int func decode(UInt.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt func decode<T>(T.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> T func decode(Int8.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int8 func decode(Int16.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int16 func decode(Int32.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int32 func decode(Int64.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int64 func decode(UInt8.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt8 func decode(Int128.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int128 func decode(UInt16.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt16 func decode(UInt32.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt32 func decode(UInt64.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt64 func decode(UInt128.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt128 func decodeIfPresent(String.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> String? func decodeIfPresent(Bool.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Bool? func decodeIfPresent(Double.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Double? func decodeIfPresent(Float.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Float? func decodeIfPresent(Int.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int? func decodeIfPresent(UInt.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt? func decodeIfPresent<T>(T.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> T? func decodeIfPresent(Int8.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int8? func decodeIfPresent(Int16.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int16? func decodeIfPresent(Int32.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int32? func decodeIfPresent(Int64.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int64? func decodeIfPresent(UInt8.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt8? func decodeIfPresent(Int128.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> Int128? func decodeIfPresent(UInt16.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt16? func decodeIfPresent(UInt32.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt32? func decodeIfPresent(UInt64.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt64? func decodeIfPresent(UInt128.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> UInt128? func decodeNil(forKey: KeyedDecodingContainer<K>.Key
) throws -> Bool func nestedContainer<NestedKey>(keyedBy: NestedKey.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> KeyedDecodingContainer<NestedKey> func nestedUnkeyedContainer(forKey: KeyedDecodingContainer<K>.Key
) throws -> any UnkeyedDecodingContainer func superDecoder(
) throws -> any Decoder Returns a
Decoder
instance for decodingsuper
from the container associated with the defaultsuper
key.func superDecoder(forKey: KeyedDecodingContainer<K>.Key
) throws -> any Decoder
Instance features
func decode(Int128.Type, forKey: Self.Key
) throws -> Int128 func decode(UInt128.Type, forKey: Self.Key
) throws -> UInt128 func decodeIfPresent(String.Type, forKey: Self.Key
) throws -> String? func decodeIfPresent(Bool.Type, forKey: Self.Key
) throws -> Bool? func decodeIfPresent(Double.Type, forKey: Self.Key
) throws -> Double? func decodeIfPresent(Float.Type, forKey: Self.Key
) throws -> Float? func decodeIfPresent(Int.Type, forKey: Self.Key
) throws -> Int? func decodeIfPresent(UInt.Type, forKey: Self.Key
) throws -> UInt? func decodeIfPresent<T>(T.Type, forKey: Self.Key
) throws -> T? func decodeIfPresent(Int8.Type, forKey: Self.Key
) throws -> Int8? func decodeIfPresent(Int16.Type, forKey: Self.Key
) throws -> Int16? func decodeIfPresent(Int32.Type, forKey: Self.Key
) throws -> Int32? func decodeIfPresent(Int64.Type, forKey: Self.Key
) throws -> Int64? func decodeIfPresent(UInt8.Type, forKey: Self.Key
) throws -> UInt8? func decodeIfPresent(Int128.Type, forKey: Self.Key
) throws -> Int128? func decodeIfPresent(UInt16.Type, forKey: Self.Key
) throws -> UInt16? func decodeIfPresent(UInt32.Type, forKey: Self.Key
) throws -> UInt32? func decodeIfPresent(UInt64.Type, forKey: Self.Key
) throws -> UInt64? func decodeIfPresent(UInt128.Type, forKey: Self.Key
) throws -> UInt128?
Available in FoundationEssentials
where K:CodingKey
Instance members
func decode<T, C>(CodableConfiguration<T?, C>.Type, forKey: KeyedDecodingContainer<K>.Key
) throws -> CodableConfiguration<T?, C> func decode<T>(T.Type, forKey: KeyedDecodingContainer<K>.Key, configuration: T.DecodingConfiguration
) throws -> T func decode<T, C>(T.Type, forKey: KeyedDecodingContainer<K>.Key, configuration: C.Type
) throws -> T func decodeIfPresent<T>(T.Type, forKey: KeyedDecodingContainer<K>.Key, configuration: T.DecodingConfiguration
) throws -> T? func decodeIfPresent<T, C>(T.Type, forKey: KeyedDecodingContainer<K>.Key, configuration: C.Type
) throws -> T?