encoding/xml: no way to output cdata field into a nested node #16198
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
go version go1.6.2 darwin/amd64
https://play.golang.org/p/aVay4sw8xA
I'm working on a web service which supports JSON and XML as output formats:
It worked perfectly, but recently we got a new requirement from our external partner to wrap all XML values into CDATA. So instead of:
I need this:
Currently Go doesn't provide a way to do that without introducing a new nested structure like:
which breaks JSON serialization.
The text was updated successfully, but these errors were encountered: