0

I have read many "json error" questions like this cannot define a JSON array and this one Expected a JSON object, array or literal.json. However, I found these questions are not similar to mine.

The following attached picture is my json file and the reported error, can any one tell me what's the problem with my json file? Thanks a lot!

enter image description here

Zexi Gong
  • 169
  • 11

1 Answers1

1

json files only supports a specific format like javascript objects/arrays, example:

car : {
 "brand": "SEAT",
 "seats": 4,
 "kilometersMade": [20,33,56,88]
}

you are typing javascript this should be typed into .js file

adriangc
  • 157
  • 1
  • 1
  • 6