kolo / xmlrpc

Implementation of XMLRPC protocol in Go language.
MIT License
158 stars 92 forks source link

problem occurs when has omitempty #79

Closed Amrf000 closed 3 years ago

Amrf000 commented 3 years ago

https://github.com/kolo/xmlrpc/blob/38db28db192bb84c8d980177f9d8ad8e7c58bbe3/decoder.go#L153

State string xmlrpc:"state,omitempty"

problem occurs when has omitempty

icholy commented 3 years ago

Please describe what "problem occurs" and provide a test case which demonstrates it.

Amrf000 commented 3 years ago

Please describe what "problem occurs" and provide a test case which demonstrates it.

I realize that this is my problem of use. Because I want to serialize some xmlrpc results from the python-django environment into the entities which is generated by gin-swagger (github.com/mikkeloscar/gin-swagger), because swagger ui does not supporting xmlrpc tag, so I modified the implement "xmlrpc"=>"json" in my local github.com/kolo/xmlrpc storage. In this scene, when the json field is not necessary, an additional omitempty will be generated, which will make above problems,. Of course, It's a very specific scenario of me, Any way, your implementation is Okey. I will handled it by myself, so I will close this issue.