summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Glasser <glasser@meteor.com>2016-05-31 12:28:57 -0700
committerAndrew Gerrand <adg@golang.org>2016-06-03 00:40:59 +0000
commit92cd6e3af9f423ab4d8ac78f24e7fd81c31a8ce6 (patch)
tree628c2fd15fa7ab2365f30e10461463eef9e6ec72
parent49c680f948310cfc7ab3062ca9a96a4adb6ae8cd (diff)
downloadgo-git-92cd6e3af9f423ab4d8ac78f24e7fd81c31a8ce6.tar.gz
encoding/json: fix docs on valid key names
This has been inaccurate since https://golang.org/cl/6048047. Fixes #15317. Change-Id: If93d2161f51ccb91912cb94a35318cf33f4d526a Reviewed-on: https://go-review.googlesource.com/23691 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--src/encoding/json/encode.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go
index 3917084dc3..d864022730 100644
--- a/src/encoding/json/encode.go
+++ b/src/encoding/json/encode.go
@@ -90,8 +90,8 @@ import (
// Int64String int64 `json:",string"`
//
// The key name will be used if it's a non-empty string consisting of
-// only Unicode letters, digits, dollar signs, percent signs, hyphens,
-// underscores and slashes.
+// only Unicode letters, digits, and ASCII punctuation except quotation
+// marks, backslash, and comma.
//
// Anonymous struct fields are usually marshaled as if their inner exported fields
// were fields in the outer struct, subject to the usual Go visibility rules amended