I\'ve got this JSON file
{ "a": 1, "b": 2 }
which has been obtained with Python json.dump method. Now, I want to
If you want to leave your JSON file as it is (without stripping new lines characters \n), include multiLine=True keyword argument
\n
multiLine=True
sc = SparkContext() sqlc = SQLContext(sc) df = sqlc.read.json('my_file.json', multiLine=True) print df.show()