Skip to content

Conversation

@pmh1wheel
Copy link

This leaves the struct handling alone in recursiveEncode, which is designed to deal with individual xml.Tokens.

Instead, we just use xml.Encode for top-level structs, and leave the formatting up to the struct tags, which allow for plenty of control

…marshaling

Currently requires an explicit Request.UseXMLEncoder flag, but can probably
automatically detect an XMLName field on the request object without breaking
compatibility with requests which might trigger the Struct branch in
recursiveEncode

It's also a slightly uncomfortable mix of creating tokens for later encoding
alongside encoding things directly, but the current interfaces make that hard
to avoid

Tests also still need a bit of work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants