You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The json.Marshal documentation refers to "anonymous struct fields," which the spec has been calling "embedded" struct fields since f8b4123. This is confusing to readers who want to know how embedded struct fields are marshaled and aren't aware of the historic terminology.
Searching the codebase for "anonymous struct" suggests that the encoding/xml godoc has the same issue.
The text was updated successfully, but these errors were encountered:
agnivade
changed the title
godoc: json.Marshal documentation uses outdated "anonymous struct fields"
encoding/json, encoding/xml: update documentation to use embedded fields instead of anonymous fields.
Aug 16, 2018
Json marshal documentation refers to "anonymous struct fields" which has been renamed to "embedded struct fields"
changed doc to reflect that change
Changes to be committed:
modified: src/encoding/json/encode.go
modified: src/encoding/xml/marshal.go
modified: src/encoding/xml/read.go
Fixesgolang#27031
Change https://golang.org/cl/129815 mentions this issue: encoding/json, encoding/xml: update doc to use "embedded struct" instead of "anonymous struct"
Change https://golang.org/cl/129756 mentions this issue: encoding/json, encoding/xml: updated the documentation to use embedded fields instead of anonymous fields.
This is a documentation issue.
The json.Marshal documentation refers to "anonymous struct fields," which the spec has been calling "embedded" struct fields since f8b4123. This is confusing to readers who want to know how embedded struct fields are marshaled and aren't aware of the historic terminology.
Searching the codebase for "anonymous struct" suggests that the encoding/xml godoc has the same issue.
The text was updated successfully, but these errors were encountered: