Parsing JSON file in Spark:
First create object of Spark Context.
import org.apache.spark.SparkContext
import org.apache.spark.SparkConf
import org.apache.spark.sql.SQLContext
val conf = new SparkConf().setAppName(appName).setMaster(master)
val sc = new SparkContext(conf)
val sqlContext = new SQLContext(sc)
sc.sqlContext.read.option("multiline",<is_multiline>)
.option("mode","PERMISSIVE")
.option("quote","\"")
.option("escape","\u0000")
.json(<path>)
** is_multiline:Boolean = True/False
** path = JSON file Path