mirror of
https://github.com/golang/go
synced 2024-10-01 03:28:32 -06:00
encoding/json: document that embedded interfaces look like non-embedded ones
Fixes #8386. LGTM=r R=golang-codereviews, r CC=golang-codereviews, iant https://golang.org/cl/149570043
This commit is contained in:
parent
85fd0fd7c4
commit
8fd56bf8c4
@ -93,6 +93,8 @@ import (
|
|||||||
// as described in the next paragraph.
|
// as described in the next paragraph.
|
||||||
// An anonymous struct field with a name given in its JSON tag is treated as
|
// An anonymous struct field with a name given in its JSON tag is treated as
|
||||||
// having that name, rather than being anonymous.
|
// 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
|
// The Go visibility rules for struct fields are amended for JSON when
|
||||||
// deciding which field to marshal or unmarshal. If there are
|
// deciding which field to marshal or unmarshal. If there are
|
||||||
|
Loading…
Reference in New Issue
Block a user