JSONDecoder
extension JSONDecoder
                - 
                  
                  
Decodes a value of the given type for the given keypath from the JSON object.
Throws
AnErrorif the decoding process encounters an error.Declaration
Swift
public func decode<T>(_ type: T.Type, from data: Data, keyPath: String) throws -> T where T : DecodableParameters
typeThe type of value to decode.
dataThe JSON object to decode.
keyPathThe key path of the decoded value is associated with.
Return Value
A decoded value of the requested type.
 
        JSONDecoder Extension Reference