Which of the following three code snippets is correct JSON syntax? Why are the other two options incorrect?
{
type: "dog",
name: "Bernie",
age: 3
}
{
"type": "dog",
"name": "Bernie",
"age": 3
}
{
"type": 'dog',
"name": 'Bernie',
"age": 3
}
Which of the following three code snippets is correct JSON? Why are the other two options incorrect?
{
"animals": [
{
"type": "dog",
"name": "Bernie",
"age": 3
},
{
"type": "cat",
"name": "Draco",
"age": 2
}
]
}
{
[
{
"type": "dog",
"name": "Bernie",
"age": 3
},
{
"type": "cat",
"name": "Draco",
"age": 2
}
]
}
[
{
"type": "dog",
"name": "Bernie",
"age": 3
},
{
"type": "cat",
"name": "Draco",
"age": 2
}
]