title: DataType.fromJson() Error: java.lang.IllegalArgumentException: Failed to convert the JSON string 'int' to a data type
body: <p>Trying to create a StructType from a JSON file to be used as schema for creating a dataframe.</p>
  <p>JSON structure:</p>
  <pre><code>    {
    &quot;type&quot; : &quot;struct&quot;,
    &quot;fields&quot; : [
      {
      &quot;name&quot; : &quot;LocationID&quot;,
      &quot;type&quot; : &quot;int&quot;,
      &quot;nullable&quot; : false,
      &quot;metadata&quot; : { }
    }, {
      &quot;name&quot; : &quot;Boroght&quot;,
      &quot;type&quot; : &quot;string&quot;,
      &quot;nullable&quot; : true,
      &quot;metadata&quot; : { }
    }, {
      &quot;name&quot; : &quot;zone&quot;,
      &quot;type&quot; : &quot;string&quot;,
      &quot;nullable&quot; : true,
      &quot;metadata&quot; : { }
    }, {
      &quot;name&quot; : &quot;serviceZone&quot;,
      &quot;type&quot; : &quot;string&quot;,
      &quot;nullable&quot; : true,
      &quot;metadata&quot; : { }
    } ]
  }
  </code></pre>
  <p>Reading JSON file and creating StructType:</p>
  <pre><code>val schemaSource =  Source.fromFile(url.getFile).mkString
  val schemaFromJson = DataType.fromJson(schemaSource).asInstanceOf[StructType]
  </code></pre>
  <p>I keep getting the error:</p>
  <pre><code>java.lang.IllegalArgumentException: Failed to convert the JSON string 'int' to a data type.
  </code></pre>
  <p>Not sure if it's the JSON structure or what to change there.</p>