KeyedDecodingContainer
public extension KeyedDecodingContainer
-
Declaration
Swift
func decode<T>(_ type: NilOnDecodingError<T>.Type, forKey key: `Self`.Key) throws -> NilOnDecodingError<T> where T : Decodable -
In case where people have not followed the spec correctly, and named keys slightly differently, allow a second key to be used so that, for example, we could check for
artifcatUriorartifact_uriin one callDeclaration
Swift
func decodeIfPresent<T>(_ type: T.Type, forKey key: `Self`.Key, orBackupKey: `Self`.Key) throws -> T? where T : Decodable
Install in Dash