Skip to content
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

encoding/json: SyntaxError's Error() should print Offset in addition to msg #7636

gopherbot opened this issue Mar 25, 2014 · 4 comments


None yet
3 participants
Copy link

commented Mar 25, 2014


What does 'go version' print?

go version
go version go1.2 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on

What happened?

I got an error.

What should have happened instead?

The error I received should tell me where in the very large bytestream it was parsing,
it encountered a parsing error.

Please provide any additional information below.

I checked the source tree on and this still seemed unimplemented.


This comment has been minimized.

Copy link

commented Mar 25, 2014

Comment 1 by

func (e *SyntaxError) Error() string { return e.msg }
Should be something like:
func (e *SyntaxError) Error() string { return fmt.Sprintf("%s at offset: %s", e.msg,
or similar.

This comment has been minimized.

Copy link

commented Mar 27, 2014

Comment 2:

Owner changed to @minux.

Status changed to Started.


This comment has been minimized.

Copy link

commented Apr 9, 2014

Comment 3:

CL references this issue.

This comment has been minimized.

Copy link

commented May 21, 2014

Comment 4:

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 25, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.