user5041242
user5041242

Reputation:

What's wrong with this JSON code?

I'm new to JSON and I'm trying to store this data in an array, I'm not sure if this is a good way of doing this or not but I can't understand why this is invalid.

"IDs": [116, {"record":{"A":943}}, 234, 38793, {"record":{"B":456}}]

I've received this error message but I don't understand it. error message

Upvotes: 0

Views: 36

Answers (1)

Jepessen
Jepessen

Reputation: 12415

you missed main parentheses:

{
    "IDs": [116, {
        "record": {
            "A": 943
        }
    }, 234, 38793, {
        "record": {
            "B": 456
        }
    }]
}

This is valid according to JSONLint

Upvotes: 1

Related Questions