title: How to save JSON data fetched from URL in PySpark?
body: <p>I have fetched some .json data from API.</p>
  <pre><code>import urllib2
  test=urllib2.urlopen('url') 
  print test
  </code></pre>
  <p><a href="https://i.stack.imgur.com/NwEUK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NwEUK.png" alt="json data fetched from url" /></a></p>
  <p>How can I save it as a table or data frame? I am using Spark 2.0.</p>