mirror of
https://github.com/golang/go
synced 2024-11-05 17:46:16 -07:00
encoding/json: Fixed the comment specifying Marshal behavior for maps.
The comment previously was reversed in sense (it appeared to be describing unmarshaling). I've fixed that, and added the caveat that map keys are subject to UTF-8 coercion like other strings. Change-Id: Id08082aa71401a6e7530a42f979fbb50bd1f4e6a Reviewed-on: https://go-review.googlesource.com/5221 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
84c7a6583a
commit
9df81f8221
@ -113,8 +113,8 @@ import (
|
|||||||
// a JSON tag of "-".
|
// a JSON tag of "-".
|
||||||
//
|
//
|
||||||
// Map values encode as JSON objects.
|
// Map values encode as JSON objects.
|
||||||
// The map's key type must be string; the object keys are used directly
|
// The map's key type must be string; the map keys are used as JSON object
|
||||||
// as map keys.
|
// keys, subject to the UTF-8 coercion described for string values above.
|
||||||
//
|
//
|
||||||
// Pointer values encode as the value pointed to.
|
// Pointer values encode as the value pointed to.
|
||||||
// A nil pointer encodes as the null JSON object.
|
// A nil pointer encodes as the null JSON object.
|
||||||
|
Loading…
Reference in New Issue
Block a user