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
Decoder.Token returns SyntaxError with messages containing double spaces after the quoted character (via Decoder.tokenError):
func (dec *Decoder) tokenError(c byte) (Token, error) { var context string switch dec.tokenState { case tokenTopValue: context = " looking for beginning of value" case tokenArrayStart, tokenArrayValue, tokenObjectValue: context = " looking for beginning of value" case tokenArrayComma: context = " after array element" case tokenObjectKey: context = " looking for beginning of object key string" case tokenObjectColon: context = " after object key" case tokenObjectComma: context = " after object key:value pair" } return nil, &SyntaxError{"invalid character " + quoteChar(c) + " " + context, dec.offset()} }
I found this when building a test suite under go version go1.10 darwin/amd64, but it is still an issue as per current HEAD of the master branch: https://github.com/golang/go/blob/master/src/encoding/json/stream.go#L474
go version go1.10 darwin/amd64
I intend to contribute a patch, this issue is mainly to serve as reference and avoid duplication of effort (however small it may be).
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/125775 mentions this issue: encoding/json: eliminate superfluous space in Decoder.Token error messages
encoding/json: eliminate superfluous space in Decoder.Token error messages
Sorry, something went wrong.
This isn't a regression from 1.10 and we're very late into the code freeze, so I'm putting this down for 1.12. Thanks for the fix!
You're welcome!
Do I need to do anything when 1.11 is released to continue beyond re-merging from master?
You don't need to do anything other than respond to reviews and fix any conflicts if they emerge. We should get to this CL along with all the others waiting for the freeze to be over.
Ok, thank you!
97c7e0e
No branches or pull requests
Decoder.Token returns SyntaxError with messages containing double spaces after the quoted character (via Decoder.tokenError):
I found this when building a test suite under
go version go1.10 darwin/amd64
, but it is still an issue as per current HEAD of the master branch: https://github.com/golang/go/blob/master/src/encoding/json/stream.go#L474I intend to contribute a patch, this issue is mainly to serve as reference and avoid duplication of effort (however small it may be).
The text was updated successfully, but these errors were encountered: