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
I am just trying to encode to json a struct that has an URL as string field
https://play.golang.org/p/jxflalBcUQc
{"url":"https://www.example.com?field1=test&field2=test2"}
{"url":"https://www.example.com?field1=test\u0026field2=test2"}
go version go1.11.1 darwin/amd64 GOARCH="amd64" GOBIN="" GOCACHE="/Users/felipeweb/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/felipeweb/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11.1/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11.1/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/felipeweb/go/src/github.com/funccloud/auth/go.mod" GOROOT/bin/go version: go version go1.11.1 darwin/amd64 GOROOT/bin/go tool compile -V: compile version go1.11.1 uname -v: Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 ProductName: Mac OS X ProductVersion: 10.14 BuildVersion: 18A391 lldb --version: lldb-1000.0.37 Swift-4.2
The text was updated successfully, but these errors were encountered:
See https://golang.org/pkg/encoding/json/#Encoder.SetEscapeHTML
Sorry, something went wrong.
No branches or pull requests
What did you do?
I am just trying to encode to json a struct that has an URL as string field
https://play.golang.org/p/jxflalBcUQc
What did you expect to see?
{"url":"https://www.example.com?field1=test&field2=test2"}
What did you see instead?
{"url":"https://www.example.com?field1=test\u0026field2=test2"}
System details
The text was updated successfully, but these errors were encountered: