Expecting ',' delimiter
The parser finished one value and found another one starting immediately, with no comma between them. The trap is that this is reported both when a comma is genuinely missing and when a string ended earlier than you intended — and the second case is far more common.
How the message appears
CPython's json module reports line, column and character offset. Treat the position as an upper bound: an unterminated string moves it well past the real mistake.
What causes it
An unescaped double quote inside a string
This is the one worth checking first. "she said "hi" to me" is not one string containing quotes — it is the string "she said ", then the bare word hi, then more text. The parser sees two values in a row and reports a missing comma, pointing at innocent-looking text several characters after the real mistake.
A genuinely missing comma
Two members or two array elements with nothing between them, usually after hand-editing or after a merge that dropped a line.
A colon typed as a comma
Produces the sibling message Expecting ':' delimiter instead: a key was read, and the thing after it was not a colon.
The fix
Escape every double quote that belongs inside a string as \", and add any comma that is genuinely missing between members. When the reported column points at text that looks fine, read leftwards for a quote that closed a string too early.
{
"quote": "she said "hi" to me",
"id": 2
}{
"quote": "she said \"hi\" to me",
"id": 2
}The example travels in the URL fragment, which browsers never send to a server.
Worth knowing
- Do not interpolate text into a JSON template with an f-string or
%. The moment a value contains a quote, an apostrophe-heavy sentence or a Windows path, you get this error.json.dumpsescapes correctly and is not slower in any way that matters. - The sibling message
Expecting ':' delimiterhas the same shape of cause: something appeared where the parser knew a specific single character had to be.