title: convert columns of spark data frame to json
body: <p>I have a data frame of which contains statistical description of a data frame.
  <code>
  x=summaryDataFrame
  +-------+---+
  |summary| c1|
  +-------+---+
  |  count|  3|
  |   mean|3.0|
  | stddev|2.0|
  |    min|  1|
  |    max|  5|
  +-------+---+
  </code>
  now i want to convert it into a json of format 
  <code>
  {"c1":{"mean":3,"count":3,"stddev":2,...}}
  </code></p>
  
  <p>also I can have n number of columns in <code>x</code>. Please help me implement this I am very new to scala.</p>
  
  <p>Thanks in Advance</p>