struct Team: Codable {
struct Player: Codable {
let id: String
let health: Int
let joinDate: Date
}
let players: [Player]
}
let team = try TOMLDecoder().decode(Team.self, from: tomlData)
TOMLDecoder has a relatively simple set of APIs. Learn more in the introduction.
TOMLDecoder
|| |-| |
|
|
|
|
|
|
|
|
|
|
|
TOML parser for your Swift
Codable
s.TOMLDecoder has a relatively simple set of APIs. Learn more in the introduction.
Installation
With SwiftPM
License
MIT. See
LICENSE.md
.