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
init<Container>(Container)
Creates a new instance with the given container.
var allKeys: [KeyedDecodingContainer<K>.Key]
All the keys the decoder has for this container.
var codingPath: [CodingKey]
The path of coding keys taken to get to this point in decoding.
func contains(KeyedDecodingContainer<K>.Key) -> Bool
Returns a Boolean value indicating whether the decoder contains a value associated with the given key.
func decode(UInt16.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt16
Decodes a value of the given type for the given key.
func decode(Int32.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int32
Decodes a value of the given type for the given key.
func decode(Int64.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int64
Decodes a value of the given type for the given key.
func decode(Double.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Double
Decodes a value of the given type for the given key.
func decode(Bool.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Bool
Decodes a value of the given type for the given key.
func decode<T>(T.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> T
Decodes a value of the given type for the given key.
func decode(UInt.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt
Decodes a value of the given type for the given key.
func decode(String.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> String
Decodes a value of the given type for the given key.
func decode(Int16.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int16
Decodes a value of the given type for the given key.
func decode(Int8.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int8
Decodes a value of the given type for the given key.
func decode(UInt8.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt8
Decodes a value of the given type for the given key.
func decode(UInt32.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt32
Decodes a value of the given type for the given key.
func decode(Float.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Float
Decodes a value of the given type for the given key.
func decode(Int.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int
Decodes a value of the given type for the given key.
func decode(UInt64.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt64
Decodes a value of the given type for the given key.
func decodeIfPresent(Int8.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int8?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(Double.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Double?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(Bool.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Bool?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(String.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> String?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(Int64.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int64?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(UInt16.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt16?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(Float.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Float?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(UInt64.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt64?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(UInt8.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt8?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(Int16.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int16?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(Int.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(UInt32.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt32?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(UInt.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> UInt?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent(Int32.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> Int32?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent<T>(T.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> T?
Decodes a value of the given type for the given key, if present.
func decodeIfPresent<T>(T.Type, forKey: Self.Key) throws -> T?
func decodeIfPresent(Int32.Type, forKey: Self.Key) throws -> Int32?
func decodeIfPresent(UInt.Type, forKey: Self.Key) throws -> UInt?
func decodeIfPresent(Int64.Type, forKey: Self.Key) throws -> Int64?
func decodeIfPresent(UInt8.Type, forKey: Self.Key) throws -> UInt8?
func decodeIfPresent(Double.Type, forKey: Self.Key) throws -> Double?
func decodeIfPresent(UInt32.Type, forKey: Self.Key) throws -> UInt32?
func decodeIfPresent(Int.Type, forKey: Self.Key) throws -> Int?
func decodeIfPresent(Int8.Type, forKey: Self.Key) throws -> Int8?
func decodeIfPresent(UInt64.Type, forKey: Self.Key) throws -> UInt64?
func decodeIfPresent(UInt16.Type, forKey: Self.Key) throws -> UInt16?
func decodeIfPresent(Bool.Type, forKey: Self.Key) throws -> Bool?
func decodeIfPresent(Int16.Type, forKey: Self.Key) throws -> Int16?
func decodeIfPresent(String.Type, forKey: Self.Key) throws -> String?
func decodeIfPresent(Float.Type, forKey: Self.Key) throws -> Float?
func decodeNil(forKey: KeyedDecodingContainer<K>.Key) throws -> Bool
Decodes a null value for the given key.
func nestedContainer<NestedKey>(keyedBy: NestedKey.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> KeyedDecodingContainer<NestedKey>
Returns the data stored for the given key as represented in a container keyed by the given key type.
func nestedUnkeyedContainer(forKey: KeyedDecodingContainer<K>.Key) throws -> UnkeyedDecodingContainer
Returns the data stored for the given key as represented in an unkeyed container.
func superDecoder() throws -> Decoder
Returns a Decoder
instance for decoding super
from the container associated with the default super
key.
func superDecoder(forKey: KeyedDecodingContainer<K>.Key) throws -> Decoder
Returns a Decoder
instance for decoding super
from the container associated with the given key.
func decode<T, C>(CodableConfiguration<T?, C>.Type, forKey: KeyedDecodingContainer<K>.Key) throws -> CodableConfiguration<T?, C>
func decode<T, C>(T.Type, forKey: KeyedDecodingContainer<K>.Key, configuration: C.Type) throws -> T
func decode<T>(T.Type, forKey: KeyedDecodingContainer<K>.Key, configuration: T.DecodingConfiguration) 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?