Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/dduan/tomldecoder
- Owner: dduan
- License: mit
- Created: 2019-03-05T17:57:37.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-12-17T18:09:47.000Z (2 months ago)
- Last Synced: 2025-02-06T21:49:01.714Z (15 days ago)
- Topics: codable, swift, toml
- Language: Swift
- Homepage:
- Size: 395 KB
- Stars: 70
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
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`.