encoding/json: Sequential Key Casing #23726
Comments
@andreidorin13 don't ignore error from json.Unmarshal — it's non-nil here: As I see it the real caveat here is presence of
Please see the illustration here: https://play.golang.org/p/A9OXJRX4LlL I believe that in presence of two or more attributes whose names differ only by case the preferring an exact match clause of json.Unmarshal doesn't hold — it seem to always use the value from the last attribute it encounters. |
Duplicate of #14750. Closing this one. |
What version of Go are you using (
go version
)?go version go1.9.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build924240465=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
What did you do?
Link: https://play.golang.org/p/FNjS_tks7Ps
What did you expect to see?
What did you see instead?
Why does the lower case "v", followed by an upper case "V", cause the byte array to be empty?
The text was updated successfully, but these errors were encountered: