You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What did you do?
I'm trying to parse some SSL certificate metadata and encountered this error when decoding/unmarshaling from a JSON file containing the following input string:
Thank you for raising this issue. It looks like the panic is coming from your error handling code, not the json package. What is the issue here? Is it the panic, or a difficulty parsing json? If it’s the latter the issue tracker may not be the best place for this discussion.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
I think I might be experiencing a bug with an upstream library that relies on encoding/json but the error is making it look like it's a bug with encoding/json. Let me do a bit more investigation on my part and confirm.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
I'm trying to parse some SSL certificate metadata and encountered this error when decoding/unmarshaling from a JSON file containing the following input string:
After further investigation, I found it to be related to the following lines: https://github.com/golang/go/blob/master/src/encoding/json/scanner.go#L340-L343 -- it's expecting that a slash will correspond to an escaped quote
"
character, but this is not always the case.Relevant Go Playground Link: https://play.golang.org/p/tovEHscZFes
What did you expect to see?
The above input string should be parsed to:
What did you see instead?
You will get the following panic:
The text was updated successfully, but these errors were encountered: