We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
json.Marshal sometimes encode json.RawMessage as it was []byte, that is it put the base64 encoding of the content, instead of the raw content.
The "sometimes" seems to be when the enclosing structure is passed by value to json.Marshal (and not when a pointer is passed).
See https://play.golang.org/p/RxMaWUHjrS
I expected both invocation to give identical results.
as well as reproducing in the playground I tested it (with the same results) on os X:
go version go1.7 darwin/amd64 GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/moshe/Documents/code/gopath" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/y6/cd3mw6tx1qn89g0vn2pdz4gc0000gn/T/go-build778754863=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1"
and linux:
go version go1.7.1 linux/amd64 GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/go" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build250125797=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1"
The text was updated successfully, but these errors were encountered:
Dup of #14493
Sorry, something went wrong.
No branches or pull requests
json.Marshal sometimes encode json.RawMessage as it was []byte, that is it put the base64 encoding of the content, instead of the raw content.
The "sometimes" seems to be when the enclosing structure is passed by value to json.Marshal (and not when a pointer is passed).
See https://play.golang.org/p/RxMaWUHjrS
I expected both invocation to give identical results.
as well as reproducing in the playground I tested it (with the same results) on os X:
and linux:
The text was updated successfully, but these errors were encountered: