mirror of
https://github.com/golang/go.git
synced 2025-11-08 12:41:02 +00:00
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>
This commit is contained in:
parent
65a864a628
commit
ed3d672766
3 changed files with 30 additions and 23 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue