@sudhir reddyTry with csv writer as text expects only one column.
df.write.mode("overwrite").csv("/user/root/JOUT")
(or)
Convert the df to rdd then use saveAsTextFile to write the json to hdfs
df.rdd.saveAsTextFile("/user/root/JOUT")
(or)
using .format("json") and save the file to hdfs
df.write.format("json").mode("append").save("/user/root/JOUT")
Some useful links regarding similar errors link1,link2,link3