title: Why reading a json format file resulting all the records going to _corrupt_record in pyspark
body: <p>I am reading data from an api call and the data is in the form of json like below:</p>
  <pre><code>{'success': True, 'errors': \[\], 'requestId': '151a2#fg', 'warnings': \[\], 'result': \[{'id': 10322433, 'name': 'sdfdgd', 'desc': '', 'createdAt': '2016-09-20T13:48:58Z+0000', 'updatedAt': '2020-07-16T13:08:03Z+0000', 'url': 'https://eda', 'subject': {'type': 'Text', 'value': 'Register now'}, 'fromName': {'type': 'Text', 'value': 'ramjdn fg'}, 'fromEmail': {'type': 'Text', 'value': 'ffdfee@ozx.com'}, 'replyEmail': {'type': 'Text', 'value': 'ffdfee@ozx.com'}, 'folder': {'type': 'Folder', 'value': 478, 'folderName': 'sjha'}, 'operational': False, 'textOnly': False, 'publishToMSI': False, 'webView': False, 'status': 'approved', 'template': 1031, 'workspace': 'Default', 'isOpenTrackingDisabled': False, 'version': 2, 'autoCopyToText': True, 'preHeader': None}\]}
  </code></pre>
  <p>Now when I am creating a dataframe out of this data using below code:</p>
  <pre><code>df = spark.read.json(sc.parallelize(\[data\]))
  </code></pre>
  <p>I am getting only one column which is _corrupt_record, below is the dataframe o/p I am getting. I have tried using <strong>multine is true</strong> but am still not getting the desired output.</p>
  <pre class="lang-none prettyprint-override"><code>+--------------------+
  |     \_corrupt_record|
  \+--------------------+
  |{'id': 12526, 'na...|
  \+--------------------+
  </code></pre>
  <p>Expected o/p is the dataframe after exploding json with different columns, like id as one column, name as other column and so on.</p>
  <p>I have tried lot of things but not able to fix this.</p>