diff options
| author | Eli Bendersky <eliben@google.com> | 2019-08-02 14:13:23 -0700 |
|---|---|---|
| committer | Daniel Martí <mvdan@mvdan.cc> | 2019-09-09 17:28:54 +0000 |
| commit | 28f8f55bd29f997fc814782f161ae09520955a8d (patch) | |
| tree | 7c76050692b745c8742162541fb92ebbc8c11ef1 /src/encoding/json | |
| parent | b12b6723007bea5a5837a21d7c4fd1a0cc9f0c67 (diff) | |
| download | go-28f8f55bd29f997fc814782f161ae09520955a8d.tar.xz | |
encoding/json: clarify Unmarshal behavior for map keys
This is a documentation-only change
Fixes #33298
Change-Id: I816058a872b57dc868dff11887214d9de92d9342
Reviewed-on: https://go-review.googlesource.com/c/go/+/188821
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/encoding/json')
| -rw-r--r-- | src/encoding/json/decode.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/encoding/json/decode.go b/src/encoding/json/decode.go index df1c085917..2b135f0da5 100644 --- a/src/encoding/json/decode.go +++ b/src/encoding/json/decode.go @@ -72,7 +72,8 @@ import ( // use. If the map is nil, Unmarshal allocates a new map. Otherwise Unmarshal // reuses the existing map, keeping existing entries. Unmarshal then stores // key-value pairs from the JSON object into the map. The map's key type must -// either be a string, an integer, or implement encoding.TextUnmarshaler. +// either be any string type, an integer, implement json.Unmarshaler, or +// implement encoding.TextUnmarshaler. // // If a JSON value is not appropriate for a given target type, // or if a JSON number overflows the target type, Unmarshal |
