avrora v0.2.0 Avrora.Mapper View Source

This module is used mainly to cover difference between common Elixir structures and erlavro structures.

Link to this section Summary

Functions

Mapping given tuple-based structure to the Elixir map.

Link to this section Functions

Link to this function

to_map(value) View Source
to_map(term()) :: term()

Mapping given tuple-based structure to the Elixir map.

Examples

iex> map = Avrora.Mapper.to_map([{:a, 1}, {"b", [nil, 11.1, "three"]}, {:c, [{:hello, "world"}]}])
iex> %{"a" => a, "b" => b, "c" => c} = map
iex> a
1
iex> b
[nil, 11.1, "three"]
iex> c
%{"hello" => "world"}