What’s the nicest way for an Elixir library to depend on either Jason or Poison? Ideally, it’d be like an optional dependency which uses whatever’s available. The libary needs a JSON encoder to function, though, so I can’t make them both optional.
What’s the nicest way for an Elixir library to depend on either Jason or Poison? Ideally, it’d be like an optional dependency which uses whatever’s available. The libary needs a JSON encoder to function, though, so I can’t make them both optional.