toml-temp ~master
D implementation of TOML (temporary)
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-temp:json - TOML/JSON conversion
<img align="right" alt="Logo" width="100" src="https://raw.githubusercontent.com/toml-lang/toml/master/logos/toml-100.png">
Implementation of Tom's Obvious, Minimal Language for D, based on TOML 0.5.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"));
Compile and test
$ dub build
$ dub test
Compile and test with reggae
Firts time:
make build
cd build
reggae .. -b ninja
cd -
ninja -C build -t targets // list targets
ninja -C build -t clean // clean build files
then:
ninja -C build
ninja -C build ut
./build/ut
Conversion
- Registered by o3o
- ~master released 6 months ago
- o3o/toml-temp
- MIT
- Authors:
- Sub packages:
- toml-temp:json
- Dependencies:
- none
- Versions:
-
1.1.0 2022-Jun-28 1.0.1 2022-Jun-21 ~master 2022-Sep-02 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
8 downloads total
-
- Score:
- 0.0
- Short URL:
- toml-temp.dub.pm