title: How to maintain order of key-value in DataFrame same as JSON?
body: <p>Sample JSON data:</p>
  
  <pre><code>{"name": "dev","salary": 100,"occupation": "engg","address": "noida"}
  {"name": "karthik","salary": 200,"occupation": "engg","address": "blore"}
  </code></pre>
  
  <p>Spark Java code:</p>
  
  <pre><code>DataFrame df = sqlContext.read().json(jsonPath);
  df.printSchema();
  df.show(false);
  </code></pre>
  
  <p>Output:</p>
  
  <pre class="lang-none prettyprint-override"><code>root
   |-- address: string (nullable = true)
   |-- name: string (nullable = true)
   |-- occupation: string (nullable = true)
   |-- salary: long (nullable = true)
  
  
  +-------+-------+----------+------+
  |address|name   |occupation|salary|
  +-------+-------+----------+------+
  |noida  |dev    |engg      |10000 |
  |blore  |karthik|engg      |20000 |
  +-------+-------+----------+------+
  </code></pre>
  
  <p>Columns are arranged in the alphabetical order. <strong>Is there any way to maintain natural order?</strong></p>