I would like to create a JSON from a Spark v.1.6 (using scala) dataframe. I know that there is the simple solution of doing df.toJSON.
df.toJSON
However, my probl
Spark 2.1 should have native support for this use case (see #15354).
import org.apache.spark.sql.functions.to_json df.select(to_json(struct($"c1", $"c2", $"c3")))