-
Notifications
You must be signed in to change notification settings - Fork 18.1k
encoding/json: SyntaxError.Offset is wrong when decoding stream #44811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Comments
Yep. That looks like a bug. |
AlexanderYastrebov
added a commit
to AlexanderYastrebov/go
that referenced
this issue
Oct 13, 2021
Stream decoder does not count whitespaces, empty objects and arrays in syntax error offset. This change removes offset tracking from the scanner and relies on the calling code to provide the correct value. Fixes golang#44811
Change https://golang.org/cl/355729 mentions this issue: |
I've found an apparent duplicate #34543 for which https://go-review.googlesource.com/c/go/+/284078/ attempts to add |
AlexanderYastrebov
added a commit
to AlexanderYastrebov/go
that referenced
this issue
Oct 13, 2021
Stream decoder does not count whitespaces, empty objects and arrays in syntax error offset. This change removes offset tracking from the scanner and relies on the calling code to provide the correct value. Fixes golang#44811, golang#34543
Duplicate of #34543 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes. reproducable on playground with 1.16 version
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/cPDdjRRl1Rg
What did you expect to see?
offset: 34
What did you see instead?
offset: 24
The text was updated successfully, but these errors were encountered: