{
"color": "red",
"count": 2
}A formatter and a viewer both refuse broken JSON, and they bury the reason under the job they were about to do. JSON validator does the parse and stops. Valid text returns the sentence Valid JSON. Invalid text returns the parser message, a character position, a line, and a column, so you can move the cursor there.
The check is syntax. It does not compare the document with a schema, and it does not pretty-print. A trailing comma, a missing comma, a bare key, or a truncated file all fail. An empty box fails because there is nothing to parse. Once the sentence says Valid JSON, the formatter, the tree, and the schema page will accept the same text.
{"color":"red","count":2}. A broken twin drops the comma: {"color": "red" "count": 2}.
The sample returns Valid JSON. The broken twin returns Expected ',' or '}' after property value in JSON at position 16 (line 1 column 17).
The line and column are the repair instruction, and they show up here without a format or a tree getting in the way.
The words Valid JSON. The document is not echoed. Pretty-printing is the formatter.
Columns are counted on that line, starting at 1. Position 16 is the same spot counted from the start of the text, starting at 0. For a missing comma after red, both point at the quote before count.
It means the text parses. A schema check of types and required keys is a separate step. This page will accept {"color": 2} as valid JSON.
There is no value. The parser reports an unexpected end of input. Paste at least a value such as null, [], or the color object.
The source is only read. Key order and whitespace stay in your paste. The result is the sentence or the error.