Custom JSON codec

To use a different JSON library you must pass in the json_codec option:

config :elastix_fork,
  json_codec: JiffyCodec,
  json_options: [:return_maps]

This must be a module that implements the ElastixFork.JSON.Codec behavior:

defmodule JiffyCodec do
  @behaviour ElastixFork.JSON.Codec

  def encode!(data), do: :jiffy.encode(data)
  def decode(json, opts \\ []), do: {:ok, :jiffy.decode(json, opts)}
end

Or you can just a library that already provides this interface, like Jason:

config :elastix_fork,
  json_codec: Jason