Skip to content
Parse TOML files into Swift objects.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dependencies
Resources
Scripts
Sources/TOMLDeserializer
TOMLDeserializer.xcodeproj
TOMLDeserializer.xcworkspace
Tests
.gitignore
.swift-version
.travis.yml
LICENSE.md
Makefile
Package.resolved
Package.swift
README.md
RELEASING.md
TOMLDeserializer.podspec

README.md

TOMLDeserializer

Turn TOML data into Swift objects.

try TOMLDeserializer.tomlTable(with: data) // [String: Any]

Compatible with TOML v0.5.0

Unless you have a good reason not to, TOMLDecoder is probably a better choice for your TOML needs.

Installation

With CocoaPods

use_frameworks!

pod "TOMLDeserializer"

With SwiftPM

.package(url: "https://github.com/dduan/TOMLDeserializer", from: "0.1.3")

With Carthage

github "dduan/TOMLDeserializer"

Types

In addition to Swift types from the standard library, date and time are represeted with types from the NetTime library. The following is a mapping from types defined in the TOML spec to Swift types.

TOML Swift
String Swift.String
Integer Swift.Int64
Float Swift.Double
Boolean Swift.Bool
Local Time NetTime.LocalTime
Local Date NetTime.LocalDate
Local Date-Time NetTime.LocalDateTime
Offset Date-Time NetTime.DateTime
Array Swift.[Any]
Table Swift.[String: Any]

License

MIT. See LICENSE.md.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.