KeyedDecodingContainer
public extension KeyedDecodingContainer
-
Caches a link to be resolved once all resources in the response have been serialized.
Throws
Forwards the error if no link object is in the JSON at the specified key.Declaration
Swift
func resolveLink(forKey key: KeyedDecodingContainer.Key, decoder: Decoder, callback: @escaping (AnyObject) -> Void) throwsParameters
keyThe
KeyedDecodingContainer.Keyrepresenting the JSON key where the related resource is found.decoderThe
Decoderbeing used to deserialize the JSON to user-defined classes.callbackThe callback used to assign the linked item at a later time.
-
Caches an array of linked resources to be resolved once all resources in the response have been deserialized.
Throws
Forwards the error if no link object is in the JSON at the specified key.Declaration
Swift
func resolveLinksArray(forKey key: KeyedDecodingContainer.Key, decoder: Decoder, callback: @escaping (AnyObject) -> Void) throwsParameters
keyThe
KeyedDecodingContainer.Keyrepresenting the JSON key where the related resources are found.decoderThe
Decoderbeing used to deserialize the JSON to user-defined classes.callbackThe callback used to assign the linked items at a later time.
View on GitHub
KeyedDecodingContainer Extension Reference