It should work, unless you made some typos somewhere or haven’t recompiled the project so that the protocols could get re-consolidated again. You can also try Jason instead of Posion:
iex(1)> t = {:propose, "Appeltaart"}
{:propose, "Appeltaart"}
iex(2)> Jason.encode t
{:error,
%Protocol.UndefinedError{
protocol: Jason.Encoder,
value: {:propose, "Appeltaart"},
description: "Jason.Encoder protocol must always be explicitly implemented"
}}
iex(3)> Jason.encode (Tuple.to_list t)
{:ok, "[\"propose\",\"Appeltaart\"]"}
Although, as Ben noted above, it all depends on what kind of JSON you want to see at the end of the day.


















