Skip to content

rahultumpala/huml-ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

huml-ex

Elixir support for HUML markup

This library implements the HUML v0.1.0 and HUML v0.2.0 specifications.

Usage

The API is similar to the Jason Elixir library.

# HUML.decode/1

{:ok, doc} = HUML.decode(valid_huml_doc_str)

{:error, message} = HUML.decode(invalid_huml_doc_str)
  • A dictionary item in the doc is reprsented as an Elixir Map struct
  • A List item is represented as an Elixir List struct
  • nan --> :nan
  • inf , +inf --> :infinity
  • -inf --> :neg_infinity
  • null --> nil
  • false and true are same as Elixir's built in boolean types

Coverage

Finished in 0.3 seconds (0.00s async, 0.3s sync)
174 tests, 0 failures

This library uses git submodules to load upstream tests into the tests folder.

test_gen.exs contains a convenient macro to auto generate ExUnit test cases from upstream test definitions.

Running mix test will generate tests and run the implementation against them.

Installation

Clone the git repo and reference the path in the mix.exs file of your project.

# in mix.exs

defp deps do
  [{:huml, path: "<path to huml-ex project>"}]
end

This library is not available in hex yet.

About

Elixir support for HUML markup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages