go/src/encoding
Augusto Roman ffbd31e9f7 encoding/json: allow non-string type keys for (un-)marshal
This CL allows JSON-encoding & -decoding maps whose keys are types that
implement encoding.TextMarshaler / TextUnmarshaler.

During encode, the map keys are marshaled upfront so that they can be
sorted.

Fixes #12146

Change-Id: I43809750a7ad82a3603662f095c7baf75fd172da
Reviewed-on: https://go-review.googlesource.com/20356
Run-TryBot: Caleb Spare <cespare@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-05 15:08:04 +00:00
..
ascii85 all: single space after period. 2016-03-02 00:13:47 +00:00
asn1 encoding/asn1: tags should be encoded in minimal form. 2016-03-25 22:07:54 +00:00
base32 all: single space after period. 2016-03-02 00:13:47 +00:00
base64 encoding/base64: correct DecodedLen overestimate for unpadded encodings 2016-03-15 20:43:04 +00:00
binary cmd/compile: extend prove pass to handle constant comparisons 2016-03-31 21:16:23 +00:00
csv all: single space after period. 2016-03-02 00:13:47 +00:00
gob all: delete dead test code 2016-03-21 07:10:08 +00:00
hex all: single space after period. 2016-03-02 00:13:47 +00:00
json encoding/json: allow non-string type keys for (un-)marshal 2016-04-05 15:08:04 +00:00
pem all: single space after period. 2016-03-02 00:13:47 +00:00
xml all: use bytes.Equal, bytes.Contains and strings.Contains 2016-04-01 02:05:01 +00:00
encoding.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00