From ed3d6727661250883c3c7e9a5b60d59a01cfa42e Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 8 Nov 2017 07:16:07 -0800 Subject: 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 TryBot-Result: Gobot Gobot Reviewed-by: Emmanuel Odeke Reviewed-by: Joe Tsai --- src/encoding/json/encode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/encoding/json/encode.go') 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 -- cgit v1.3