TOMLDecoder 0.1.6

TOMLDecoder 0.1.6

Maintained by Daniel Duan.



 
Depends on:
NetTime~> 0.2.2
TOMLDeserializer~> 0.2.4
 

TOMLDecoder

Decode your values from TOML v0.5.0 contents.

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)

Supported platforms: iOS, Linux, macOS, tvOS and watchOS.

Learn more in the introduction.

Installation

With CocoaPods

use_frameworks!

pod "TOMLDecoder"

With SwiftPM

.package(url: "https://github.com/dduan/TOMLDecoder", from: "0.1.6")

With Carthage

github "dduan/TOMLDecoder"

License

MIT. See LICENSE.md.