title: how to convert json string to dataframe on spark
body: <p>I want to convert string variable below to dataframe on spark.</p>
  
  <pre><code>val jsonStr = "{ "metadata": { "key": 84896, "value": 54 }}"
  </code></pre>
  
  <p>I know how to create dataframe from json file. </p>
  
  <pre><code>sqlContext.read.json("file.json")
  </code></pre>
  
  <p>but I don't know how to create dataframe from string variable.</p>
  
  <p>How can I convert json String variable to dataframe.</p>