aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/encode.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-11-08 07:16:07 -0800
committerJoe Tsai <joetsai@google.com>2017-11-08 20:34:55 +0000
commited3d6727661250883c3c7e9a5b60d59a01cfa42e (patch)
tree28cca5f1cc4c21043185f6812d9db367ecdab8f9 /src/encoding/json/encode.go
parent65a864a628cb9ab767fb973d82ed979d6046f4f2 (diff)
downloadgo-ed3d6727661250883c3c7e9a5b60d59a01cfa42e.tar.xz
encoding/json: permit encoding uintptr as a string
Fixes #22629 Change-Id: I31e85f9faa125ee0dfd6d3c5fa89334b00d61e6e Reviewed-on: https://go-review.googlesource.com/76530 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Joe Tsai <joetsai@google.com>
Diffstat (limited to 'src/encoding/json/encode.go')
-rw-r--r--src/encoding/json/encode.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go
index 3f7a8d0175..317a5a940d 100644
--- a/src/encoding/json/encode.go
+++ b/src/encoding/json/encode.go
@@ -1131,7 +1131,7 @@ func typeFields(t reflect.Type) []field {
switch ft.Kind() {
case reflect.Bool,
reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
- reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
+ reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr,
reflect.Float32, reflect.Float64,
reflect.String:
quoted = true