-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
proposal: encoding/xml: Add RawMessage type #25683
Comments
What exactly is this issue about? It seems to me like people could declare Are you suggesting that |
@mvdan Exactly I'm suggesting someone to add encoding/xml.RawMessage, but if I want to use it now, can I implement a simple version? |
If you want to propose the addition of
Yes, as said above, I don't see why you wouldn't be able to declare that type yourself and use it. |
@mvdan edit it as a proposal |
Have you seen this CL and proposal? https://github.com/golang/proposal/blob/master/design/13504-natural-xml.md |
Like @mvdan says, you can implement this easily yourself. It doesn't need to be in encoding/xml. Also xml is effectively frozen until we have some more time to think about systemic issues in the API. Since this functionality does not require a change (it can be done outside the package), that's the best place for it. |
Currently encoding/xml does not have a RawMessage type like encoding/json, this could be used like
B could be some other struct.
The text was updated successfully, but these errors were encountered: