I am a greenhorn in elixir and want to test the Poison functions from iex
https://hexdocs.pm/poison/1.3.1/#functions_details
iex> Poison.decode("[1,2,3]")
When I run this command I am getting the error below.
iex(1)> Poison.decode("[1,2,3]")
** (UndefinedFunctionError) function Poison.decode/1 is undefined (module Poison is not available)
Poison.decode("[1,2,3]")
What am I doing wrong here?
If you have a
mixproject (created bymix new project_nameormix phx.new project_name), runiex -S mixto load dependencies into youriexconsole. Make sure you are in the projects directory. If you don't have such project, create it.Make sure the required packages are listed in
mix.exs: