{
"id": 1,
"name": "John Doe",
"email": "[email protected]"
}
{
"user": {
"id": 1,
"name": "Jane Smith"
},
"posts": [
{
"title": "First Post",
"content": "Hello World"
},
{
"title": "Second Post",
"content": "More text"
}
]
}
{
"user": { "id": 1, "name": "Alice" },
"posts": [
{ "title": "Hello", "content": "World" },
{ "title": "Second", "content": "More text" }
]
}
[
{
"productId": 1001,
"productName": "Widget"
},
{
"productId": 1002,
"productName": "Gadget"
}
]
[
{
color: "red",
value: "#f00"
},
{
color: "green",
value: "#0f0"
},
{
color: "blue",
value: "#00f"
},
{
color: "cyan",
value: "#0ff"
},
{
color: "magenta",
value: "#f0f"
},
{
color: "yellow",
value: "#ff0"
},
{
color: "black",
value: "#000"
}
]
{
color: "red",
value: "#f00"
}
Keys are unquoted, which is invalid in strict JSON.
{
'color': 'blue',
'value': '#00f'
}
Uses single quotes for strings and keys instead of double quotes.
{
"color": "green",
"value": "#0f0",
}
Trailing comma after the last key-value pair is invalid.