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
If a JSON value is not appropriate for a given target type, or if a JSON number overflows the target type, Unmarshal skips that field and completes the unmarshaling as best it can. If no more serious errors are encountered, Unmarshal returns an UnmarshalTypeError describing the earliest such error.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, I had try it at go version go1.13 linux/amd64
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/QEWC05EBLBs
What did you expect to see?
The variable
arr
should be a empty slice because an error happened atjson.Unmarshal([]byte(str), &arr)
.What did you see instead?
The variable
arr
is a non-empty slice with 3 elementsThe text was updated successfully, but these errors were encountered: