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

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.