Skip to content

jaydg/toml.d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

======= toml.d. A TOML Parser for D

Usage:

import toml.d;

auto config = parse(`
    title = "TOML Example"

    [owner]
    name = "Tom Preston-Werner"
    organization = "GitHub"
    bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
    dob = 1979-05-27T07:32:00Z # First class dates? Why not?

    [database]
    server = "192.168.1.1"
    ports = [ 8001, 8001, 8002 ]
    connection_max = 5000
    enabled = true
    `);

auto title = config["title"].str;
auto db = config["database"]["server"].str;

or

auto config = parseFile("/path/to/toml.conf");

TODO

  1. Tables in tables

About

TOML Parser for D

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • D 100.0%