title: elixir poison not able to decode JSON
body: <p>I am trying below code</p>
  
  <pre><code>data = Poison.decode!(payload)
      |&gt; ProperCase.to_snake_case
  Logger.info("data is #{data}")
  </code></pre>
  
  <p>Where the payload is from Messging Queue</p>
  
  <pre><code>    {
        "name":"Joe",
        "id": "13",
        "version": 0
      }
  </code></pre>
  
  <p>With this I am getting an error</p>
  
  <pre><code>[error] Could not process PerfectFlight: %Protocol.UndefinedError{description: "", protocol: String.Chars, value: %{"id" =&gt; "13", "name" =&gt; "Joe", "version" =&gt; 0}}
  </code></pre>
  
  <p>However, If I change my input json to </p>
  
  <pre><code> "{
    \"name\":\"Joe\",
    \"id\": \"13\",
    \"version\": 0
  }"
  </code></pre>
  
  <p>The <code>Poison.decode()</code> works pefectly fine. Now the issue is that I don't want to change my input <code>JSON</code> because of many reasons. What am I missing?</p>
  
  <p><strong>Edit</strong> : The code was failing not at the decode but on the next line <code>Logger.info("data is #{data}")</code>. Since the output of <code>decode</code> function is not a <code>String</code> I should rather use IO.inspect as below. Accepting Adams answer for his confidence in decode function. </p>
  
  <pre><code>data = Poison.decode!(payload)
      |&gt; ProperCase.to_snake_case
  IO.inspect(data)
  </code></pre>