1.1 KiB
1.1 KiB
Readme
guile-toml
Installation
For now: add this folder to GUILE_LOAD_PATH
Usage
When parsing and building TOML documents, guile-toml follows guile-json as close as possible. TOML types correspon to Guile types according to the following table:
TOML | Guile |
---|---|
string | string |
key-value pair | alist |
array | vector |
integer/float | real |
true | #t |
false | #f |
datetime | SRFI-19 date [1] |
nan | +nan.0 |
{+-}inf | {+-}inf.0 |
To start using guile-toml: (use-modules (toml))
[1]: TOML's time-local
is parsed same as a datetime-local
on the date of 1970-01-01
.
Reading TOML documents
(toml->scm str)
Reads a TOML document from the given string.
Building TOML documents
(scm->toml native #:optional port)
Not implemented yet.
Examples
> (toml->scm "[a]\n b.c = \"hi world\"")
(("a" ("b" ("c" . "hi world"))))