I want to convert the string variable below in a dataframe to a spark.
val jsonStr = "{ "metadata": { "key": 84896, "value": 54 }}"
I know how to create a dataframe from a json file.
sqlContext.read.json("file.json")
but I don't know how to create a dataframe from a string variable.
How to convert json String variable to dataframe.
json scala dataframe apache-spark
lucas kim
source share