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

Allow for nil tags #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Allow for nil tags #75

wants to merge 1 commit into from

Conversation

sfowl
Copy link

@sfowl sfowl commented Jul 21, 2020

I added this patch in order to work with an API that presents xml with any empty nil tag (i.e. <nil/>) when the value of foo is nil, e.g.:

     <struct>
        <member>
          <name>foo</name>
          <value>
            <nil/>
          </value>
        </member>
     ...
    </struct>

To use this patch, the struct looks like below:

type Params struct {
    Foo  *string `xmlrpc:"foo,nilTag"`
    Bar string  `xmlrpc:"bar"`
}

Would a patch like this be appropriate for kolo/xmlrpc? Any suggestions on better ways to work with this sort of data would be much appreciated (mostly I just want to avoid maintaining a separate fork) :)

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

Successfully merging this pull request may close these issues.

None yet

1 participant