hocon v0.1.2 Hocon.Document View Source
This module represents the necessary functions for the creation of the final configuration. The configuration
is built up with put/3
function and as the final step the convert
function is called, which resolves the
substitutions to its current values in the current configuration object.
Link to this section Summary
Functions
Converts the document into a map by
Link to this section Functions
Converts the document into a map by
- converting numerically indexed maps into arrays
- resolving substitutions to it's values
Example
iex> doc = %Document{root: %{"employee" => %{"firstname" => "Michael", "lastname" => "Maier"}, "fullname" => "${employee.firstname} ${employee.lastname}"}}
iex> Document.convert(doc)
%{
"employee" => %{"firstname" => "Michael", "lastname" => "Maier"},
"fullname" => "Michael Maier"
}