Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/json, encoding/xml: update documentation to use embedded fields instead of anonymous fields. #27031

Open
hundt opened this issue Aug 16, 2018 · 4 comments
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@hundt
Copy link

hundt commented Aug 16, 2018

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.

@agnivade 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
@agnivade agnivade added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Aug 16, 2018
@moficodes
Copy link

I can make this commit and pull request.
Could someone assign me this issue?
@agnivade

Thanks.

moficodes added a commit to moficodes/go that referenced this issue Aug 18, 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

Fixes golang#27031
@gopherbot
Copy link

Change https://golang.org/cl/129815 mentions this issue: encoding/json, encoding/xml: update doc to use "embedded struct" instead of "anonymous struct"

@gopherbot
Copy link

Change https://golang.org/cl/129756 mentions this issue: encoding/json, encoding/xml: updated the documentation to use embedded fields instead of anonymous fields.

@gopherbot
Copy link

Change https://go.dev/cl/552959 mentions this issue: encoding/json: clarify handling of embedded fields' methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants