Reading a JSON error, and the two problems a valid file can still hide
JSON is strict about a few things that JavaScript, Python and YAML are relaxed about, and nearly every invalid file breaks one of the same handful of rules. A comma after the last item is not allowed. Strings and keys need double quotes, not single quotes. Comments are not allowed at all. The literals are lowercase true, false and null, so Python's True and None fail, and JavaScript's undefined and NaN do not exist in JSON. Numbers cannot have a leading zero, a leading plus sign or a bare decimal point.
The browser's own JSON.parse finds these mistakes, but it reports them tersely, and every browser words it differently. A typical message names an unexpected token and a character position, which leaves you counting characters. This validator uses its own parser, which knows the usual causes. It tells you the line and column, shows that line with a caret under the spot, and says in a sentence what is wrong and how to fix it. For a trailing comma it says so; for a single quote it tells you to use double quotes; for an unclosed bracket it names the line where the bracket opened.
Passing the check does not mean every program will read the file the same way. The first hidden problem is duplicate keys. The standard says object keys should be unique but does not require it, so {"id": 1, "id": 2} is valid JSON. What it means depends on the reader. JavaScript and Python keep the last value. Some Go and Java libraries keep the first, and a strict reader rejects the file. A config file with a duplicate key can therefore behave differently in two services. The validator lists the path of every repeated key, such as $.users[3].email.
The second hidden problem is numbers. JSON allows a number of any length, but most programs read numbers into 64-bit floats, which hold about 16 significant digits. An ID such as 1234567890123456789 is valid JSON, yet a browser or a Node.js service reads it as 1234567890123456800, and the next request uses the wrong ID. The validator checks every number and lists those a JavaScript reader would change, with their paths. The usual fix is to send such IDs as strings.
The summary at the top is a quick sanity check too. It says whether the top level is an object or an array, how many keys or items it has, how many values there are in total, and how deep the nesting goes. If you expected an array of 500 records and it says an object with 3 keys, the data is wrapped differently from what you thought. All of this happens in your browser, and the JSON never leaves the page.