Instance Methodswift 6.0.1Swift
decodeIfPresent(_:forKey:)
func decodeIfPresent(_ type: Int.Type, forKey key: KeyedDecodingContainer<K>.Key) throws -> Int?
Other members in extension
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(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