aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2019-07-31 13:42:16 -0700
committerIan Lance Taylor <iant@golang.org>2019-07-31 21:49:08 +0000
commite81b7315927d025a1eb3933542211b899880b982 (patch)
treea081f71235f8a87b850dd6d6ab29a0a99626ce3c /src/encoding/json
parentfe8a86646478b11db5697108a4db0deeaca29595 (diff)
downloadgo-e81b7315927d025a1eb3933542211b899880b982.tar.xz
encoding/json: clarify Marshal behavior for string keys of maps
This is a documentation-only change. Fixes #28827 Change-Id: Ife9ab997809048784f35872b09905bc209a05eff Reviewed-on: https://go-review.googlesource.com/c/go/+/188417 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/json')
-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 3474d4a667..67412763d6 100644
--- a/src/encoding/json/encode.go
+++ b/src/encoding/json/encode.go
@@ -137,7 +137,7 @@ import (
// string, an integer type, or implement encoding.TextMarshaler. The map keys
// are sorted and used as JSON object keys by applying the following rules,
// subject to the UTF-8 coercion described for string values above:
-// - string keys are used directly
+// - keys of any string type are used directly
// - encoding.TextMarshalers are marshaled
// - integer keys are converted to strings
//