Yamel
An yaml parser and serializer to work with Yaml files in Elixir.
WELCOME HACKTOBERFEST PARTYPEOPLE!! πππ₯³π©πΏβπ»π©πΎβπ»π©π½βπ»π©πΌβπ»π©π»βπ»π©βπ»π¨βπ»π¨π»βπ»π¨πΌβπ»π¨π½βπ»π¨πΎβπ»π¨πΏβπ»
Here are some few things I'd like to ask you beforehand for this event!
Basic Code of Conduct
- Be nice to other people, no matter what, should you interact with anyone.
-
Open short, but meaningful and valuable, PR(s). This way is easier to review on time.
- E.g.: Instead of document a whole module, you can document just one function, for instance. This goes with the Quality over Quantity value from Hacktoberfest.
- This is a fresh repository which I'm already using in production. I apologize for the lack of more information but feel free to interact with me through the Issues or twitter with the hashtag #elixirJenkiexs.
We appreciate your collaboration! Thank you very much!! ππΏππΎππ½ππΌππ»πβ¨
Installation
Add yamel to your list of dependencies in mix.exs:
def deps do
[
{:yamel, "~> 1.0.3"}
]
endUsage
yaml_string = ~S"""
foo: bar
zoo:
- caa
- boo
- vee
"""
Yamel.decode!(yaml_string)
=> %{"foo" => "bar", "zoo" => ["caa", "boo", "vee"]}
Yamel.encode!(["caa", :boo, :"\"foo\""])
=> "- caa\n- boo\n- \"foo\"\n\n"
%{foo: :bar, zoo: :caa}
|> Yamel.encode!()
|> Yamel.IO.write!("/to/file.yml")
=> :ok
%{foo: value} = Yamel.IO.read!("/from/file.yaml")