Answer the question
In order to leave comments, you need to log in
Why is this JSON not valid?
In one script I used JSON. It seemed to me that it was valid, but I began to run it through the validator and got an error.
Here is the JSON itself. What's wrong with it?
{
"id": 1
},
{
"id": 2
},
{
"id": 3
},
{
"id": 4
}
Answer the question
In order to leave comments, you need to log in
JSON document can only contain 1 object
Wrap everything in square brackets - will be an array
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question