diff options
author | Russ Cox <rsc@golang.org> | 2014-10-06 15:48:17 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-10-06 15:48:17 -0400 |
commit | 108521744f8607c55dff4fca73342d8e72219641 (patch) | |
tree | 067dc8608de6e09f2a6c4478f6b46a8925b3f311 /src/encoding | |
parent | 1bd70feb2f014c81db749dde3fb66b40938aae19 (diff) | |
download | go-108521744f8607c55dff4fca73342d8e72219641.tar.gz |
encoding/json: document that embedded interfaces look like non-embedded ones
Fixes issue 8386.
LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://codereview.appspot.com/149570043
Diffstat (limited to 'src/encoding')
-rw-r--r-- | src/encoding/json/encode.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go index b63538c92..9b7b9d5fd 100644 --- a/src/encoding/json/encode.go +++ b/src/encoding/json/encode.go @@ -93,6 +93,8 @@ import ( // as described in the next paragraph. // An anonymous struct field with a name given in its JSON tag is treated as // having that name, rather than being anonymous. +// An anonymous struct field of interface type is treated the same as having +// that type as its name, rather than being anonymous. // // The Go visibility rules for struct fields are amended for JSON when // deciding which field to marshal or unmarshal. If there are |