Open
Description
v := jsontext.Value(`["foo", "bar", "baz", ]`)
fmt.Println(v.Compact())
prints:
jsontext: invalid character ']' at start of value within "/3" after offset 22
We should instead report something like:
jsontext: invalid trailing ',' before ']' after offset 20
An accidental trailing comma is a common mistake in hand-modified JSON.
While the current syntactic error is correct (and actually the easiest to produce given the parsing context), it is not particularly easy for a human to diagnose the problem.
\cc @scottjab
Metadata
Metadata
Assignees
Labels
No labels