Packages

Integration between NotLoaded & Poison

Current section

Files

Jump to
not_loaded_poison lib not_loaded_poison.ex
Raw

lib/not_loaded_poison.ex

defmodule NotLoaded.Poison do
@moduledoc """
Integrates NotLoaded with Poison.
It implements the Poison.Encoder protocol for NotLoaded to ensure it can't
accidentally be converted to JSON.
"""
end
defimpl Poison.Encoder, for: NotLoaded do
alias Poison.EncodeError
def encode(value, _options) do
raise EncodeError, value: value
end
end