Decoding and Encoding `nil`
Virviil opened this issue · comments
Źmićer Rubinštejn commented
I think that encoding and decoding nil should raise ArgumentError
, it should produce {:error, ArgumentError}
at least. It seems to be a bug, because
iex(1)> Poison.encode(nil)
{:ok, "null"}
iex(2)> Poison.decode(nil)
** (ArgumentError) argument error
:erlang.iolist_to_binary(nil)
iex:35: Poison.Parser.parse/2
iex:69: Poison.decode/2
Źmićer Rubinštejn commented
Seems to be fixed in master branch already. I'm sorry