I want to convert string variable below to dataframe on spark.

```
val jsonStr = "{ "metadata": { "key": 84896, "value": 54 }}"

```

I know how to create dataframe from json file. 

```
sqlContext.read.json("file.json")

```

but I don't know how to create dataframe from string variable.

How can I convert json String variable to dataframe.