/json_provider

A json provider for distillery 2 using jason

Primary LanguageElixirMIT LicenseMIT

Build Status

JsonProvider

A json provider for distillery 2 using the jason library

Installation

If available in Hex, the package can be installed by adding json_provider to your list of dependencies in mix.exs:

def deps do
  [
    {:json_provider, "~> 0.4.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/json_provider.

Usage notes

Most JSON types map as expected. However, specific JSON objects can be used to have atoms or charlists in the final config output.

charlist

{
  "mnesia": {
    "dir": {
      "type": "charlist",
      "value": "/home/tester/directory"
    }
  }
}

atom

{
  "Elixir.Some.Nested.Module": {
    "log_level": {
      "type": "atom",
      "value": "warn"
    }
  }
}