Enable atom autodetection for keys and values
masterBy default, all keys and values are strings. To automatically convert keys and values starting with : into atoms, pass atoms: true to read_from_string/2 or read_from_file/2.
Warning: Atoms are not garbage collected by the BEAM. Do not use this option with untrusted user-supplied input to avoid memory exhaustion attacks.
yaml = """
a: a
:f: :atom
"""
YamlElixir.read_from_string(yaml, atoms: true)
# {:ok, %{:f => :atom, "a" => "a"}}