toml 1.0.0-rc.2
D implementation of TOML
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
toml:json - TOML/JSON conversion
Implementation of Tom's Obvious, Minimal Language for D, based on TOML 0.4.0
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
- Registered by Kripth
- 1.0.0-rc.2 released 7 years ago
- dlang-community/toml
- MIT
- Authors:
- Sub packages:
- toml:json
- Dependencies:
- none
- Versions:
-
2.0.1 2022-Nov-30 2.0.0 2022-Nov-30 1.0.0 2021-Aug-11 1.0.0-rc.3 2018-Sep-04 1.0.0-rc.2 2018-Feb-16 - Download Stats:
-
-
1 downloads today
-
3 downloads this week
-
13 downloads this month
-
3738 downloads total
-
- Score:
- 1.6
- Short URL:
- toml.dub.pm