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 · 3 comments · May be fixed by #27068
Open

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

hundt opened this issue Aug 16, 2018 · 3 comments · May be fixed by #27068

Comments

@hundt
Copy link

@hundt 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
@moficodes
Copy link

@moficodes moficodes commented Aug 18, 2018

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

@gopherbot gopherbot commented Aug 18, 2018

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

@gopherbot gopherbot commented Aug 18, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.