Still a newbie at Elixir so I'm sure this must be something simple I'm doing wrong but I can't seem to find any info or explanation. Trying to decode any JSON string to an Elixir map with string keys works fine but if I pass the :atoms or :atoms! option I get the below argument error.
If it helps I'm running Elixir on FreeBSD. Thanks for any info!
Still a newbie at Elixir so I'm sure this must be something simple I'm doing wrong but I can't seem to find any info or explanation. Trying to decode any JSON string to an Elixir map with string keys works fine but if I pass the :atoms or :atoms! option I get the below argument error.
If it helps I'm running Elixir on FreeBSD. Thanks for any info!
iex(5)> Jason.decode("{\"somekey\": \"somevalue\"}") {:ok, %{"somekey" => "somevalue"}}
iex(7)> Jason.decode("{\"somekey\": \"somevalue\"}", [ %{ keys: :atoms! } ])
** (ArgumentError) argument error (stdlib 3.8.2.4) :maps.from_list([%{keys: :atoms!}]) (elixir 1.10.4) lib/enum.ex:1276: Enum.into/2 (jason 1.2.2) lib/jason.ex:56: Jason.decode/2