hocon v0.1.8 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

Link to this section Functions

Link to this function

convert(document, opts \\ [])

View Source

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"
}
Link to this function

get_or_fetch_env(result, path, arg3)

View Source
Link to this function

get_raw(root, keypath, visited \\ [])

View Source
Link to this function

get_raw(root, value, keypath, visited)

View Source
Link to this function

merge(document1, document2)

View Source
Link to this function

merge(root, key, original, value)

View Source
Link to this function

put(doc, key, value, tokens \\ [], opts \\ [])

View Source