devinus / poison

An incredibly fast, pure Elixir JSON library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poison does not encode tuples, no mention in docs

BourgeoisBear opened this issue · comments

Using v3.1, tuples do not encode:

iex(1)> Poison.encode({1, 2})
{:error, {:invalid, {1, 2}}}

I think encoding to an array would be more robust. If that is a no-go, documenting the inability to encode tuples would be an improvement.

commented

Looks like this is applicable to version 4.1 too, any workarounds for this?