Toml Elixir v1.0.0 TomlElixir

TomlElixir

TOML parser for elixir.

Installation

The package can be installed by adding toml_elixir to your list of dependencies in mix.exs:

def deps do
  [{:toml_elixir, "~> 1.0.0"}]
end

Usage

TomlElixir is used by calling parse functions

Summary

Functions

Parse toml string to map or return raw list. Return ok/error tuple

Parse toml string to map or return raw list. Raises error on failure

Types

options()
options() :: [{:no_parse, boolean}] | Keyword.t
return()
return() :: toml_return | Map.t
toml_group()
toml_group() :: {:group, [toml_ident], [toml_key_val]}
toml_ident()
toml_ident() :: {:identifier, binary}
toml_key_val()
toml_key_val() :: {toml_ident, toml_value}
toml_multi()
toml_multi() :: {:multi, [toml_ident], [toml_key_val]}
toml_return()
toml_return() :: [toml_key_val | toml_multi | toml_group]
toml_value()
toml_value ::
  {:string, binary} |
  {:datetime, tuple} |
  {:number, number} |
  {:boolean, boolean}

Functions

parse(str, opts \\ [])
parse(binary, options) :: {:ok, return} | {:error, String.t}

Parse toml string to map or return raw list. Return ok/error tuple

Possible options

  • no_parse :: boolean
parse!(str, opts \\ [])
parse!(binary, options) :: return

Parse toml string to map or return raw list. Raises error on failure

Possible options

  • no_parse :: boolean