aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorScott Bell <scott@sctsm.com>2016-05-16 12:36:02 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2016-05-16 19:43:53 +0000
commit181000896e381f07e8f105eef2667d566729f6eb (patch)
treec21195847be609a53d83354b65f09c34f31948fe /src/encoding
parent64770f642fe4b2f3af6f30d1e058e934e73d0b9b (diff)
downloadgo-181000896e381f07e8f105eef2667d566729f6eb.tar.xz
encoding/json: document that object keys are sorted
Fixes #15424 Change-Id: Ib9e97509f5ac239ee54fe6fe37152a7f5fc75087 Reviewed-on: https://go-review.googlesource.com/23109 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/encoding')
-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 8b967471ce..f91a78724c 100644
--- a/src/encoding/json/encode.go
+++ b/src/encoding/json/encode.go
@@ -119,8 +119,8 @@ import (
//
// Map values encode as JSON objects. The map's key type must either be a
// string, an integer type, or implement encoding.TextMarshaler. The map keys
-// are used as JSON object keys by applying the following rules, subject to the
-// UTF-8 coercion described for string values above:
+// 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
// - encoding.TextMarshalers are marshaled
// - integer keys are converted to strings