JSON Multiline - Df creation

Not able to create DataFrame correctly using spark scala.

Results attached in screenshot. How can I create DF?
File Content:

[{
“RecordNumber”: 2,
“Zipcode”: 704,
“ZipCodeType”: “STANDARD”,
“City”: “PASEO COSTA DEL SUR”,
“State”: “PR”
},
{
“RecordNumber”: 10,
“Zipcode”: 709,
“ZipCodeType”: “STANDARD”,
“City”: “BDA SAN LUIS”,
“State”: “PR”
}][ Read Less](javascript:void(0):wink:

Hi.

You have already created the Dataframe.
Since this is JASON file so [{ }] wil be there you can delete it.

  1. val multiline_df = spark.read.option("multiline","true")
      .json("YOUR_JSON_FILE .json")
    multiline_df.show()    ```
    
    
  2. Read multiple files

    val df2 = spark.read.json(
      "YOUR_JSON_FILE.json1",
      "YOUR_JSON_FILE.json2")
    df2.show()
  //read all files from a folder
    val df3 = spark.read.json("YOUR_JSON_Folder ")
    df3.show(false)

All the best!