Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/xml: no way to output cdata field into a nested node #16198
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.