poison icon indicating copy to clipboard operation
poison copied to clipboard

Poison does not encode tuples, no mention in docs

Open BourgeoisBear opened this issue 5 years ago • 1 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.

BourgeoisBear avatar Jul 18 '19 00:07 BourgeoisBear

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

D4no0 avatar Jan 20 '21 10:01 D4no0