trimfirstandlast() {
  sed 's/.$//; s/^.//' $@
}
trimjson() {
  sed 's/\\\"/\"/g' $@ | sed 's/\\\\/\\/g'
}
trimhivejson() {
  trimfirstandlast $@ | trimjson
}
Add trimhivejson to trim a file produced from : df.select("json_column_name").write.format("com.databricks.spark.csv").save("file:///home/jovyan/data/json_single_column.csv")
Add trimhivejson to trim a file produced from :
df.select("json_column_name").write.format("com.databricks.spark.csv").save("file:///home/jovyan/data/json_single_column.csv")
