UnsafeAtomizeKeys (unsafe_atomize_keys v1.0.0)
Link to this section Summary
Functions
Function to convert all binary keys to atoms in a map. Keys of other types will be left unchanged. The conversion will deeply traverse nested maps and lists. See README for explanation of why this function is "unsafe".
Link to this section Functions
Link to this function
unsafe_atomize_keys(map)
Function to convert all binary keys to atoms in a map. Keys of other types will be left unchanged. The conversion will deeply traverse nested maps and lists. See README for explanation of why this function is "unsafe".
Examples
iex> unsafe_atomize_keys(%{"a" => "b", :c => "d"}) %{a: "b", c: "d"}
iex> unsafe_atomize_keys(%{"deep" => %{"key" => "value"}}) %{deep: %{key: "value"}}
iex> unsafe_atomize_keys(%{"list" => [%{"key" => "value"}]}) %{list: [%{key: "value"}]}