Skip to content

Commit

Permalink
encoding/json: clarify Marshal behavior for string keys of maps
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
eliben authored and ianlancetaylor committed Jul 31, 2019
1 parent fe8a866 commit e81b731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/encoding/json/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down

0 comments on commit e81b731

Please sign in to comment.