@sudhir reddySqlContext is not available by default in Spark2 shell.
Create a sqlContext using below statement after launching the spark-shell and then you can read the json using this sqlContext.
val sqlContext = new org.apache.spark.sql.SQLContext(sc)
Let me know if this helps.