title: form_json return null values
body: <p>I am trying a parse a string column(containing json string) using from_json, but when i show my result dataframe it shows all the value as null. i am using all type as string, so there should not be any type conversion problem, but still final result is null.
  i can show my originaldf and it shows the json string.</p>
  
  <p>sample json :</p>
  
  <pre><code>{"type": "mytype", "version": "0.2", "id": "dc771a5f-336e-4f65-be1c-79de1848d859"}
  </code></pre>
  
  <p>i am reading the json string from file </p>
  
  <pre class="lang-py prettyprint-override"><code>originaldf = spark.read.option("header",false).schema("message as string").csv(myfilepath)
  </code></pre>
  
  <p>originaldf shows. it's not showing full value in console(running in local mode)</p>
  
  <pre><code>root
   |-- message: string (nullable = true)
  
  {"fields":[{"metadata":{},"name":"message","nullable":true,"type":"string"}],"type":"struct"}
  +-----------------+
  |          message|
  +-----------------+
  |{"type": "mytype"|
  +-----------------+
  </code></pre>
  
  <p>schema passed to from_json </p>
  
  <pre class="lang-py prettyprint-override"><code>{
      "fields":[
          {
              "metadata":{
  
              },
              "name":"id",
              "nullable":true,
              "type":"string"
          },
          {
              "metadata":{
  
              },
              "name":"version",
              "nullable":true,
              "type":"string"
          },
          {
              "metadata":{
  
              },
              "name":"type",
              "nullable":true,
              "type":"string"
          }
      ],
      "type":"struct"
  }
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>newdf = originaldf.select(from_json("message",schema).alias("parsedjson")).select("parsedjson.*")
  </code></pre>
  
  <p><code>newdf.show()</code>, gives output</p>
  
  <pre><code>+----+--------+---------+
  |id  | version| type    |
  +----+--------+----------+
  |null| null   | null     |
  +----+--------+----------+
  </code></pre>