1. Trailing commas
JSON does not allow a comma after the last item in an object or array.
{
"a": 1,
}
Fix it by removing the last comma.
2. Single quotes
JSON strings and keys must use double quotes, not single quotes.
{ 'name': 'Ada' }
Correct version:
{ "name": "Ada" }
3. Missing braces or brackets
If a nested object or array does not close correctly, the parser will fail even if most of the payload looks right.
{
"items": [
{"id": 1},
{"id": 2}
4. Unquoted keys
Keys copied from JavaScript objects often lose their quotes.
{ name: "Ada" }
JSON requires:
{ "name": "Ada" }
5. Comments inside JSON
Many developers paste JSON into files that support comments and then forget that raw JSON does not.
{
// This breaks JSON
"active": true
}
How to prevent repeat errors
Validate the payload first, then format it so the structure is easy to inspect. If you are frequently copying data out of logs, sanitize the source before pasting it into a request body or config file.