title: What is the difference between => and : in an Elixir map?
body: <p>In the Phoenix framework</p>
  
  <pre><code>def show(conn, %{"id" =&gt; id}) do
    json conn, Repo.get(User, id)
  end
  </code></pre>
  
  <p>matches fine, but using the <code>:</code> notation does not pattern match</p>
  
  <pre><code>def show(conn, %{"id": id}) do
    json conn, Repo.get(User, id)
  end
  </code></pre>
  
  <p>when I call the following code from a test</p>
  
  <pre><code>conn
  |&gt; get(user_path(conn, :show, user.id))
  |&gt; json_response(200)
  </code></pre>