aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/encode.go
diff options
context:
space:
mode:
authorJes Cok <xigua67damn@gmail.com>2024-06-18 23:43:21 +0800
committerGopher Robot <gobot@golang.org>2024-06-21 18:42:18 +0000
commit72e2220b50db5179ddca2226a64bf1d3aa94f49a (patch)
tree4568bd50cae686712f31c36f074f6e416b7b417e /src/encoding/json/encode.go
parente9a306e004fb6e9c6ca6045151be0ca8bddd242b (diff)
downloadgo-72e2220b50db5179ddca2226a64bf1d3aa94f49a.tar.xz
encoding/json: clarify the map's key type for Unmarshal
While here, also fix doc link for encoding.TextMarshaler. Fixes #67495 Change-Id: Ia2a674c5c35b5a849ce8f5eef3d34d165b3195b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/593335 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@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 cb28feb279..7bee1a6805 100644
--- a/src/encoding/json/encode.go
+++ b/src/encoding/json/encode.go
@@ -141,7 +141,7 @@ import (
// are sorted and used as JSON object keys by applying the following rules,
// subject to the UTF-8 coercion described for string values above:
// - keys of any string type are used directly
-// - [encoding.TextMarshalers] are marshaled
+// - keys that implement [encoding.TextMarshaler] are marshaled
// - integer keys are converted to strings
//
// Pointer values encode as the value pointed to.