Skip to content
/ toml Public

D implementation of Tom Obvious Minimal Language (TOML)

License

Notifications You must be signed in to change notification settings

Kripth/toml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

D implementation of Tom Obvious Minimal Language (TOML)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages