Skip to content
D implementation of Tom Obvious Minimal Language (TOML)
D
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.
json Fix weird bug with DMD 2.082 Sep 4, 2018
src/toml Use assertThrown in unittest and types true/false instead of bool, li… Feb 16, 2018
.editorconfig Fix error in release mode Jun 9, 2017
.gitignore Initial commit Jun 7, 2017
.travis.yml
LICENSE Create LICENSE Jun 7, 2017
README.md
dub.sdl Separate main package from json Feb 15, 2018

README.md

Logo

Implementation of Tom's Obvious, Minimal Language for D, based on TOML 0.5.0

Build Status Code Coverage DUB Package DUB Downloads

Usage

import toml;

TOMLDocument doc;

doc = parseTOML("example = 1");
assert(doc["example"].integer == 1);

doc = parseTOML(`
	bool = true
	integer = 42
	floating = 1e2
	string = "string"
`)
assert(doc["bool"] == true);
assert(doc["integer"] == 42);
assert(doc["floating"] == 1e2);
assert(doc["string"] == "string");

// from a file
import std.file : read;
doc = parseTOML(cast(string)read("/path/to/file.toml"));

Conversion

You can’t perform that action at this time.