title: How to add comma between JSON elements using Spark Scala
body: <p>I'm loading a table data into a dataframe and creating multiple JSON part files. The structure of the data is good, but the elements in JSON are not separated by commas. </p>
  
  <p>This is the output:</p>
  
  <pre><code>{"time_stamp":"2016-12-08 01:45:00","Temperature":0.8,"Energy":111111.5,"Net_Energy":1111.3}
  {"time_stamp":"2016-12-08 02:00:00","Temperature":21.9,"Energy":222222.5,"Net_Energy":222.0}
  </code></pre>
  
  <p>I'm supposed to get something like this:</p>
  
  <pre><code>{"time_stamp":"2016-12-08 01:45:00","Temperature":0.8,"Energy":111111.5,"Net_Energy":1111.3},
  {"time_stamp":"2016-12-08 02:00:00","Temperature":21.9,"Energy":222222.5,"Net_Energy":222.0}
  </code></pre>
  
  <p>How do I do this?</p>