title: Cannot convert Hash to String?
body: <p>I am trying to parse the JSON response from Wordnik's API. This is built with Sinatra. I keep getting the error "TypeError at /word" "can't convert Hash into String". Am I using the json parser incorrectly?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>get '/word' do
    resp = Wordnik.words.get_random_word(:hasDictionaryDef =&gt; 'true', :maxCorpusCount =&gt; 20, :minLength =&gt; 10)
    result = JSON.parse(resp)
    word = result.word
    return word.to_s
  end
  </code></pre>