JSON has few rules, but those rules are strict, so one small slip makes the whole document unreadable. Error messages usually give a position but not a reason. Knowing the ten usual suspects lets you fix most problems in seconds.
Commas and brackets
The most frequent slip is a trailing comma. {"a":1,"b":2,} looks natural to a human eye but is invalid JSON. The opposite also happens: a missing comma between items, as in {"a":1 "b":2}.
Second come mismatched brackets. In deeply nested data it is hard to see whether a brace { } or a square bracket [ ] was left open. Letting a tool re-indent the text shows immediately where the structure goes wrong.
1) Remove the comma after the last item.
2) Add any comma missing between items.
3) Count opening and closing brackets and look for the line whose indentation looks wrong in the formatted view.
Quotes and escapes
Strings and keys in JSON must use double quotes. Single quotes as in {'a':1}, or an unquoted key as in {a:1}, are errors. This often appears when values are copied from another settings format.
Inside a string, double quotes, backslashes and line breaks cannot be typed directly; they must be escaped as \", \\ and \n. A Windows path like C:\temp pasted raw either fails or turns \t into a tab.
4) Replace single quotes and unquoted keys with double quotes.
5) Escape double quotes and backslashes that appear inside strings.
6) If a value contains a real line break, replace it with \n.
Errors in value types
JSON accepts only strings, numbers, true, false, null, arrays and objects. Spellings like True, None, undefined or NaN are not valid, and the keywords must be lowercase.
Numbers have rules too. Leading zeros as in 007, forms like .5 or +1, and hexadecimal such as 0xFF are not allowed. There is no date type, so dates must be written as strings.
7) Write nothing as null and booleans as lowercase true or false.
8) Write numbers like 0.5 with a leading zero and remove superfluous zeros.
Very large integers can lose precision on the receiving side, so exchanging them as strings is safer.
Comments and invisible characters
JSON has no comments. Adding // or /* */ causes an error. If you need explanations, add a separate field or choose a format that allows comments.
Invisible characters cause trouble too: a byte order mark at the start of a file, odd spaces created by copying, and curly quotes inserted by word processors. A curly quote “ ” is a different character from the straight quote ".
9) Delete comments and replace curly quotes with straight quotes.
10) If the error appears in the first few characters, suspect an invisible character and paste the text again.
Copy from a plain text editor rather than a rich document tool whenever possible.
Finding the problem quickly
The position in an error message (line and column) is where the parser noticed the problem, which can differ from where the cause lies. If a comma is missing, the error is reported at the next item. Always look at the part just before the reported spot too.
For large data, halving works well: check one half at a time, and the formatted view stays clean until the point where it breaks. The JSON formatter on this site tidies input and shows where an error sits.
Read the two or three lines before the reported position first.
After fixing, run the text through the formatter once more to confirm the structure matches what you intended.
If the same slip keeps happening, stop writing data by hand and let a program generate it; that is the real cure.