Current section
Files
Jump to
Current section
Files
src/overview.edoc
@author Benedikt Reinartz <filmor@gmail.com>
@author Stanislaw Klekot <dozzie@jarowit.net>
@title TOML parser
@version 0.4.0
@see tomlerl
@doc
`tomerl' is an Erlang library application for parsing
<a href="https://github.com/toml-lang/toml" target="_parent">TOML</a>
data. It supports parsing version 1.0.0-rc1 of the TOML
specification.
== Usage Example ==
Assuming an input file called `config.toml` with the following content:
```
lipsum = "lorem ipsum dolor sit amet"
[apples]
count = 2
[berry.black]
has_some = true
'''
the data can be read in Erlang like this:
```erlang
{ok, Data} = tomerl:read_file("config.toml").
>>> Data = #{
<<"lipsum">> => <<"lorem ipsum dolor sit amet">>,
<<"apples">> => #{ <<"count">> => 2 },
<<"berry">> => #{ <<"black">> => #{ has_some => true }}
}.
'''