EXTENSION
Decodable
public extension DecodableMethods
load(from:decoder:)
static func load<T: FlexibleDecoder>(from fileURL: URL, decoder: T) throws -> SelfLoads data from a given file URL and parses it with the given decoder.
Parameters:
- fileURL: The file URL to load from
- decoder: A decoder to use.
- Returns: The parsed object of the calling type
Parameters
| Name | Description |
|---|---|
| fileURL | The file URL to load from |
| decoder | A decoder to use. |