Join GitHub today
encoding/json: Unmarshal. Expected type string -> found int. #26928
This issue is about the json package, concretely the Unmarshal function.
My version of go: 1.10.2 windows/amd and the go env is not relevant because it happens too on play.golang.org (see the link with the example here: https://play.golang.org/p/NGoR7Vs-VxX ).
The problem I am finding is that I am receiving a json that includes an array like this:
My question is... why should
I have been diving a little on the code of the decode file, and... in this line:
removing the second condition of the if (
Thanks in advance.
PS: Finally I found this solution using
Hi @eloyucu ,
This appears to be a question rather than a Go bug. We do not use the issue tracker for general discussions or questions like these. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process.
Please feel free to reach out to the forums in the Questions wiki page; it has a list of good places for asking questions.
Closing since this is not a bug.