Commit e81b7315 authored by Eli Bendersky's avatar Eli Bendersky Committed by Ian Lance Taylor

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/+/188417Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent fe8a8664
......@@ -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
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment