Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dduan/tomldecoder

From TOML to Swift Codable types.
https://github.com/dduan/tomldecoder

codable swift toml

Last synced: 7 days ago
JSON representation

From TOML to Swift Codable types.

Awesome Lists containing this project

README

        

# TOMLDecoder

TOML parser for your Swift `Codable`s.

```swift
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](Documentation/Introduction.md).

[TOML]: https://toml.io/

## Installation

#### With [SwiftPM](https://swift.org/package-manager)

```swift
.package(url: "https://github.com/dduan/TOMLDecoder", from: "0.3.1")
```

## License

MIT. See `LICENSE.md`.