【文件属性】:
文件名称:TOMLDecoder:从TOML到Swift Codable类型
文件大小:296KB
文件格式:ZIP
更新时间:2021-05-27 11:28:40
swift toml codable Swift
TOML解码器
Swift 5.3和5.3.1
您的Swift Codable的TOML解析器。
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具有一组相对简单的API。 在了解更多信息。
安装
使用
. package ( url : " https://github.com/dduan/TOMLDecoder " , from : " 0.2.1