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: about 1 month 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-10-29T00:40:10.000Z (about 2 months ago)
- Last Synced: 2024-10-29T01:28:21.662Z (about 2 months ago)
- Topics: codable, swift, toml
- Language: Swift
- Homepage:
- Size: 373 KB
- Stars: 71
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- fucking-awesome-swift - TOMLDecoder - Latest TOML standard, decoded. (Libs / Data Management)
- awesome-swift - TOMLDecoder - Latest TOML standard, decoded. (Libs / Data Management)
- awesome-swift - TOMLDecoder - From TOML to Swift Codable types. (Data Management [🔝](#readme))
- awesome-swift - TOMLDecoder - Latest TOML standard, decoded. (Libs / Data Management)
README
# TOMLDecoder
||
|-|
|[![Amazon Linux 2](https://github.com/dduan/TOMLDecoder/workflows/Amazon%20Linux%202/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Amazon+Linux+2%22)|
|[![CentOS 7](https://github.com/dduan/TOMLDecoder/workflows/CentOS%207/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22CentOS+7%22)|
|[![macOS](https://github.com/dduan/TOMLDecoder/workflows/macOS/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22macOS%22)|
|[![Ubuntu Bionic](https://github.com/dduan/TOMLDecoder/workflows/Ubuntu%20Bionic/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Ubuntu+Bionic%22)|
|[![Ubuntu Focal](https://github.com/dduan/TOMLDecoder/workflows/Ubuntu%20Focal/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Ubuntu+Focal%22)|
|[![Windows](https://github.com/dduan/TOMLDecoder/workflows/Windows%202019/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Windows%22)|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.2.2")
```## License
MIT. See `LICENSE.md`.